Overview
| Comment: | Updated to include more detailed CURL test |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
aa5e861dc01d6a26642bf8951e327411 |
| User & Date: | rkeene on 2014-06-23 19:46:21.575 |
| Other Links: | manifest | tags |
Context
|
2014-06-23
| ||
| 20:02 | Updated to define more things check-in: b8eb9903c6 user: rkeene tags: trunk | |
| 19:46 | Updated to include more detailed CURL test check-in: aa5e861dc0 user: rkeene tags: trunk | |
| 19:43 | Updated to never delete compiler memory, since it currently cannot operate again once that happens check-in: 7ce3fcaf57 user: rkeene tags: trunk | |
Changes
Modified test.tcl
from [09314c428a]
to [49b187426d].
| ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + |
# External functions
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
set handle [tcc4tcl::new]
$handle cwrap curl_version {} vstring
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
puts [curl_version]
}
# wide values
set handle [tcc4tcl::new]
|
| ︙ | |||
102 103 104 105 106 107 108 109 110 111 112 113 114 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + + + + + + + + + + + + + + + + + + + + + + + + + + + |
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_path /usr/lib32
$handle add_library tclstub8.5
$handle go
load $tmpfile myPkg
puts [ext_add 1 42]
file delete $tmpfile
}
# More involved test
set handle [tcc4tcl::new]
$handle ccode {#include <curl/curl.h>}
$handle cwrap curl_version {} vstring
$handle cproc curl_fetch {char* url} ok {
void *handle;
handle = curl_easy_init();
if (!handle) {
return(TCL_ERROR);
}
curl_easy_setopt(handle, CURLOPT_URL, url);
curl_easy_perform(handle);
return(TCL_OK);
}
$handle add_include_path /usr/include
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
curl_fetch http://rkeene.org/
|