Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,7 +1,8 @@ TCL_CONFIG_SH := /usr/lib64/tclConfig.sh -CPPFLAGS := -I. -DUSE_TCL_STUBS=1 -DXVFS_DEBUG $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_INCLUDE_SPEC}") $(XVFS_ADD_CPPFLAGS) +XVFS_ROOT_MOUNTPOINT := //xvfs:/ +CPPFLAGS := -DXVFS_ROOT_MOUNTPOINT='"$(XVFS_ROOT_MOUNTPOINT)"' -I. -DUSE_TCL_STUBS=1 -DXVFS_DEBUG $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_INCLUDE_SPEC}") $(XVFS_ADD_CPPFLAGS) CFLAGS := -fPIC -g3 -ggdb3 -Wall $(XVFS_ADD_CFLAGS) LDFLAGS := $(XVFS_ADD_LDFLAGS) LIBS := $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_STUB_LIB_SPEC}") TCLSH := tclsh LIB_SUFFIX := $(shell . "${TCL_CONFIG_SH}"; echo "$${TCL_SHLIB_SUFFIX:-.so}") @@ -48,12 +49,12 @@ $(MAKE) clean all XVFS_ADD_CPPFLAGS="-UXVFS_DEBUG" XVFS_ADD_CFLAGS="-g0 -ggdb0 -s -O3" ./benchmark.tcl test: example-standalone$(LIB_SUFFIX) xvfs$(LIB_SUFFIX) example-client$(LIB_SUFFIX) example-flexible$(LIB_SUFFIX) Makefile rm -f __test__.tcl - echo 'if {[catch { eval $$::env(XVFS_TEST_LOAD_COMMANDS); source //xvfs:/example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl - @export XVFS_TEST_LOAD_COMMANDS; for XVFS_TEST_LOAD_COMMANDS in \ + echo 'if {[catch { eval $$::env(XVFS_TEST_LOAD_COMMANDS); source $(XVFS_ROOT_MOUNTPOINT)example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl + @export XVFS_ROOT_MOUNTPOINT; export XVFS_TEST_LOAD_COMMANDS; for XVFS_TEST_LOAD_COMMANDS in \ 'load ./example-standalone$(LIB_SUFFIX) Xvfs_example' \ 'load -global ./xvfs$(LIB_SUFFIX); load ./example-client$(LIB_SUFFIX) Xvfs_example' \ 'load ./xvfs$(LIB_SUFFIX); load ./example-flexible$(LIB_SUFFIX) Xvfs_example' \ 'load ./example-flexible$(LIB_SUFFIX) Xvfs_example'; do \ echo "[$${XVFS_TEST_LOAD_COMMANDS}] $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS)"; \ Index: example/main.tcl ================================================================== --- example/main.tcl +++ example/main.tcl @@ -6,16 +6,16 @@ tcltest::configure -verbose pbse tcltest::configure {*}$argv if {![info exists ::env(XVFS_ROOT_MOUNTPOINT)]} { - set xvfsRootMountpoint "//xvfs:" + set xvfsRootMountpoint "//xvfs:/" } else { set xvfsRootMountpoint $::env(XVFS_ROOT_MOUNTPOINT) } -set rootDir "${xvfsRootMountpoint}/example" +set rootDir "${xvfsRootMountpoint}example" set rootDirNative [file join [pwd] example] #set rootDir $rootDirNative set testFile "${rootDir}/foo" proc glob_verify {args} {