Import LinuxCNC source tree
This commit is contained in:
8
tests/symbols.1/checkresult
Executable file
8
tests/symbols.1/checkresult
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
tail -2 "$1" | (
|
||||
read -r v0
|
||||
if [ "$v0" -eq 0 ] ; then echo "Value0 should be nonzero"; exit 1; fi
|
||||
read -r v1
|
||||
if [ "$v1" -ne 0 ] ; then echo "Value1 should be zero"; exit 1; fi
|
||||
)
|
||||
1
tests/symbols.1/control
Normal file
1
tests/symbols.1/control
Normal file
@@ -0,0 +1 @@
|
||||
Restrictions: sudo
|
||||
9
tests/symbols.1/dotest.hal
Normal file
9
tests/symbols.1/dotest.hal
Normal file
@@ -0,0 +1,9 @@
|
||||
loadrt test_define1
|
||||
loadrt test_use1
|
||||
loadrt threads
|
||||
addf test-define1.0 thread1
|
||||
addf test-use1.0 thread1
|
||||
start
|
||||
loadusr -w sleep 1
|
||||
getp test-define1.0.out
|
||||
getp test-use1.0.out
|
||||
5
tests/symbols.1/test.sh
Normal file
5
tests/symbols.1/test.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
${SUDO} halcompile --install test_define1.comp
|
||||
${SUDO} halcompile --install test_use1.comp
|
||||
halrun dotest.hal
|
||||
9
tests/symbols.1/test_define1.comp
Normal file
9
tests/symbols.1/test_define1.comp
Normal file
@@ -0,0 +1,9 @@
|
||||
component test_define1;
|
||||
|
||||
pin out s32 out;
|
||||
function _;
|
||||
license "GPL";
|
||||
;;
|
||||
int testdefine;
|
||||
|
||||
FUNCTION(_) { out = testdefine++; }
|
||||
9
tests/symbols.1/test_use1.comp
Normal file
9
tests/symbols.1/test_use1.comp
Normal file
@@ -0,0 +1,9 @@
|
||||
component test_use1;
|
||||
|
||||
pin out s32 out;
|
||||
function _;
|
||||
license "GPL";
|
||||
;;
|
||||
int testdefine;
|
||||
|
||||
FUNCTION(_) { out = testdefine; }
|
||||
Reference in New Issue
Block a user