-
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.
tests-hardening: addressing shellcheck errors in our tests
These changes shall prepare LinuxCNC's test routines to accept blanks in file names.
- Loading branch information
Showing
94 changed files
with
286 additions
and
267 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
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,21 +1,28 @@ | ||
#!/bin/sh | ||
set -xe | ||
CPPFLAGS=$(pkg-config --silence-errors --cflags libtirpc) | ||
for i in $HEADERS/*.h; do | ||
|
||
for i in "$HEADERS"/*.h | ||
do | ||
case $i in | ||
*/rtapi_app.h) continue ;; | ||
esac | ||
# shellcheck disable=SC2086 | ||
gcc ${CPPFLAGS} -DULAPI -I$HEADERS -E -x c $i > /dev/null | ||
done | ||
for i in $HEADERS/*.h $HEADERS/*.hh; do | ||
case $i in | ||
|
||
for i in "$HEADERS"/*.h "$HEADERS"/*.hh | ||
do | ||
case "$i" in | ||
*/rtapi_app.h) continue ;; | ||
*/interp_internal.hh) continue ;; | ||
esac | ||
# shellcheck disable=SC2086 | ||
if g++ ${CPPFLAGS} -std=c++11 -S -o /dev/null -xcxx /dev/null > /dev/null 2>&1; then | ||
ELEVEN=-std=c++11 | ||
else | ||
ELEVEN=-std=c++0x | ||
fi | ||
g++ ${CPPFLAGS} $ELEVEN -DULAPI -I$HEADERS -E -x c++ $i > /dev/null | ||
# shellcheck disable=SC2086 | ||
g++ ${CPPFLAGS} $ELEVEN -DULAPI -I$HEADERS -E -x c++ "$i" > /dev/null | ||
done |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g cam.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g flowsnake.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g33.1.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g test.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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
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
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,3 @@ | ||
#!/bin/bash | ||
rs274 -t test.tbl -g g76only.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g17-g98-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g17-g99-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g18-g98-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g18-g99-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g19-g98-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g19-g99-g81.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g17-g98-g84.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g17-g99-g84.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g18-g98-g84.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g18-g99-g84.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
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,3 @@ | ||
#!/bin/bash | ||
rs274 -g g19-g98-g84.ngc | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} | ||
exit "${PIPESTATUS[0]}" |
Oops, something went wrong.