-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use exec instead of exit $? in tests
Before this change, the shell process will linger around to extract the exit value, only to return it to the parent process, and after this change the task is left to the kernel and one less process is used during testing. This is a very small optimisation of the tests to gut down the number of lines and reduce the resources spend during testing.
- Loading branch information
1 parent
61d96fc
commit 6e4c60d
Showing
19 changed files
with
19 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,4 @@ | |
$REALTIME start | ||
python3 hallink.py | ||
|
||
$REALTIME stop | ||
|
||
exit $? | ||
exec $REALTIME stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r halui.ini | ||
exit $? | ||
exec linuxcnc -r halui.ini | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r interp.ini | ||
exit $? | ||
|
||
exec linuxcnc -r interp.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r interp.ini | ||
exit $? | ||
|
||
exec linuxcnc -r interp.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/bash | ||
rs274 -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
export PYTHONUNBUFFERED=1 | ||
rs274 -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/bash | ||
rs274 -n 0 -i test.ini -g test.ngc | ||
exit $? | ||
exec rs274 -n 0 -i test.ini -g test.ngc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/bash | ||
rs274 -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,4 @@ | |
rm -f tool.tbl | ||
cp tool.tbl.original tool.tbl | ||
|
||
linuxcnc -r test.ini | ||
exit $? | ||
|
||
exec linuxcnc -r test.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r lathe.ini | ||
exit $? | ||
|
||
exec linuxcnc -r lathe.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r motion-test.ini | ||
exit $? | ||
|
||
exec linuxcnc -r motion-test.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
linuxcnc -r motion-test.ini | ||
exit $? | ||
|
||
exec linuxcnc -r motion-test.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
export PYTHONUNBUFFERED=1 | ||
rs274 -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
export PYTHONUNBUFFERED=1 | ||
rs274 -t test.tbl -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -t test.tbl -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
export PYTHONUNBUFFERED=1 | ||
rs274 -i test.ini -n 0 -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -n 0 -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/bash | ||
rs274 -i test.ini -g test.ngc 2>&1 | ||
exit $? | ||
exec rs274 -i test.ini -g test.ngc 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,4 @@ | |
|
||
cp -f ../simpockets.tbl.original simpockets.tbl | ||
|
||
linuxcnc -r m61-test.ini | ||
exit $? | ||
|
||
exec linuxcnc -r m61-test.ini |