Import LinuxCNC source tree
This commit is contained in:
0
tests/tclsh-extensions/expected
Normal file
0
tests/tclsh-extensions/expected
Normal file
19
tests/tclsh-extensions/skip
Executable file
19
tests/tclsh-extensions/skip
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# This test exercises the Tcl HAL extensions (tcl/hal.so,
|
||||
# tcl/linuxcnc.so), which are only built in GUI builds (BUILD_GUI);
|
||||
# skip in headless builds. The tcl dir is taken from TCLLIBPATH
|
||||
# (exported by rip-environment).
|
||||
set -u
|
||||
|
||||
if ! command -v tclsh >/dev/null 2>&1; then
|
||||
echo "skip: tclsh not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -r tcldir _ <<< "${TCLLIBPATH:-}"
|
||||
if ! [ -f "${tcldir:-/nonexistent}/linuxcnc.so" ]; then
|
||||
echo "skip: Tcl HAL extensions not built (headless build)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
8
tests/tclsh-extensions/test.sh
Normal file
8
tests/tclsh-extensions/test.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# (runtests needs to run without a display, but LINUXCNC_EMCSH is always a
|
||||
# wish-like program. Assume we can get the related non-wish interpreter in the
|
||||
# obvious way)
|
||||
$REALTIME start
|
||||
${LINUXCNC_EMCSH/wish/tclsh} test.tcl; exitval=$?
|
||||
$REALTIME stop
|
||||
exit $exitval
|
||||
2
tests/tclsh-extensions/test.tcl
Normal file
2
tests/tclsh-extensions/test.tcl
Normal file
@@ -0,0 +1,2 @@
|
||||
package require Linuxcnc
|
||||
package require Hal
|
||||
Reference in New Issue
Block a user