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     74   puts [test5 1]
    75     75   puts [test6 1]
    76     76   
    77     77   ## Delete without performing
    78     78   set handle [tcc4tcl::new]
    79     79   $handle delete
    80     80   
    81         -# External functions (requires .a files)
    82         -if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
           81  +# External functions (requires .so or .a (ELF) files which do not exist on Darwin)
           82  +if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
    83     83   	set handle [tcc4tcl::new]
    84     84   	$handle ccode {const char *curl_version(void);}
    85     85   	$handle cproc curl_version {} vstring
    86     86   	$handle add_library_path /usr/lib64
    87     87   	$handle add_library_path /usr/lib
    88     88   	$handle add_library curl
    89     89   	$handle go
................................................................................
    95     95   $handle cproc wideTest {Tcl_WideInt x} Tcl_WideInt {
    96     96   	return(x);
    97     97   }
    98     98   $handle go
    99     99   puts [wideTest 30]
   100    100   
   101    101   # Produce a loadable object
   102         -if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
          102  +## Currently doesn't work on Darwin
          103  +if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
   103    104   	set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so"
   104    105   	file delete $tmpfile
   105    106   	set handle [tcc4tcl::new $tmpfile "myPkg 0.1"]
   106    107   	$handle cproc ext_add {int a int b} long { return(a+b); }
   107    108   	$handle add_library_path /usr/lib64
   108    109   	$handle add_library_path /usr/lib
   109    110   	$handle add_library tclstub8.5
   110    111   	$handle go
   111    112   	load $tmpfile myPkg
   112    113   	puts [ext_add 1 42]
   113    114   	file delete $tmpfile
   114    115   }