tests: use environment variable indirectly
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 23 Aug 2018 12:24:41 +0900
changeset 40092 58786930ea27
parent 40091 c36846abbcd3
child 40093 726cfc47f17a
tests: use environment variable indirectly Using environment variable directly in heredoc python code will cause syntax error at checking module importation by import-checker.py strictly, because "$varname" is invalid in Python syntax. "$varname" becomes valid after environment variable substitution by shell at writing text into file. Current import-checker.py overlooks code fragment changed in this patch, because of a restriction below for a line starting code fragment. - filename must be specified before limit mark NG: cat <<EOF > FILE.py OK: cat > FILE.py <<EOF import-checker.py itself is fixed in subsequent patch.
tests/test-pending.t
--- a/tests/test-pending.t	Thu Aug 23 12:20:41 2018 +0900
+++ b/tests/test-pending.t	Thu Aug 23 12:24:41 2018 +0900
@@ -50,7 +50,7 @@
   >     f = open(fpath, 'w')
   >     f.close()
   >     # wait for ack - caller should delete the notify file
-  >     i = $maxwait
+  >     i = int("$maxwait")
   >     while os.path.exists(fpath) and i > 0:
   >         time.sleep(1)
   >         i -= 1