Check-in [a6c35050af]
Overview
Comment:Updated to not do curl tests if cross-compiling
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a6c35050af706a5c3fe0c7def009588691dd19ce
User & Date: rkeene on 2014-06-23 20:31:37
Other Links: manifest | tags
Context
2014-06-23
20:35
Updated to include build tests for FreeBSD check-in: 7986e3289d user: rkeene tags: trunk
20:31
Updated to not do curl tests if cross-compiling check-in: a6c35050af user: rkeene tags: trunk
20:29
Updated to not try to use dlopen() on PE platforms check-in: c3a3ac9cbf user: rkeene tags: trunk
Changes

Modified test.tcl from [e367198f71] to [c0aa27fcc2].

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
143
144
145

	$handle go
	load $tmpfile myPkg
	puts [ext_add 1 42]
	file delete $tmpfile
}

# More involved test

set handle [tcc4tcl::new]
$handle ccode {
#include <stdint.h>
#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/








>
|
|



|
|
|

|
|
|
|

|
|

|
|
|
|
|
|
|
|

|
>
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
143
144
145
146
147
	$handle go
	load $tmpfile myPkg
	puts [ext_add 1 42]
	file delete $tmpfile
}

# More involved test
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
	set handle [tcc4tcl::new]
	$handle ccode {
#include <stdint.h>
#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/
}