Check-in [6d4569b9da]
Overview
Comment:Updated to not perform some tests on Darwin
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6d4569b9da9952edee1fd448d830c1962d63c23c
User & Date: rkeene on 2014-06-23 02:49:18
Other Links: manifest | tags
Context
2014-06-23
02:56
Added "cwrap" subcommand to handle wrapping and creating prototype check-in: 2bc3ec252a user: rkeene tags: trunk
02:49
Updated to not perform some tests on Darwin check-in: 6d4569b9da user: rkeene tags: trunk
02:44
Updated to perform some tests only if we are not cross-compiling check-in: 0e86072bec user: rkeene tags: trunk
Changes

Modified test.tcl from [9a896e1896] to [6030390766].

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
110
111
112
113
114
puts [test5 1]
puts [test6 1]

## Delete without performing
set handle [tcc4tcl::new]
$handle delete

# External functions (requires .a files)
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
	set handle [tcc4tcl::new]
	$handle ccode {const char *curl_version(void);}
	$handle cproc curl_version {} vstring
	$handle add_library_path /usr/lib64
	$handle add_library_path /usr/lib
	$handle add_library curl
	$handle go
	puts [curl_version]
}

# wide values
set handle [tcc4tcl::new]
$handle cproc wideTest {Tcl_WideInt x} Tcl_WideInt {
	return(x);
}
$handle go
puts [wideTest 30]

# Produce a loadable object

if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
	set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so"
	file delete $tmpfile
	set handle [tcc4tcl::new $tmpfile "myPkg 0.1"]
	$handle cproc ext_add {int a int b} long { return(a+b); }
	$handle add_library_path /usr/lib64
	$handle add_library_path /usr/lib
	$handle add_library tclstub8.5
	$handle go
	load $tmpfile myPkg
	puts [ext_add 1 42]
	file delete $tmpfile
}







|
|



















>
|












74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
puts [test5 1]
puts [test6 1]

## Delete without performing
set handle [tcc4tcl::new]
$handle delete

# External functions (requires .so or .a (ELF) files which do not exist on Darwin)
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
	set handle [tcc4tcl::new]
	$handle ccode {const char *curl_version(void);}
	$handle cproc curl_version {} vstring
	$handle add_library_path /usr/lib64
	$handle add_library_path /usr/lib
	$handle add_library curl
	$handle go
	puts [curl_version]
}

# wide values
set handle [tcc4tcl::new]
$handle cproc wideTest {Tcl_WideInt x} Tcl_WideInt {
	return(x);
}
$handle go
puts [wideTest 30]

# Produce a loadable object
## Currently doesn't work on Darwin
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
	set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so"
	file delete $tmpfile
	set handle [tcc4tcl::new $tmpfile "myPkg 0.1"]
	$handle cproc ext_add {int a int b} long { return(a+b); }
	$handle add_library_path /usr/lib64
	$handle add_library_path /usr/lib
	$handle add_library tclstub8.5
	$handle go
	load $tmpfile myPkg
	puts [ext_add 1 42]
	file delete $tmpfile
}