Skip to content

Commit b8ab486

Browse files
authored
Fix test that was using not in a shell script (#66)
`not` is not a known Bash command. Instead, use `!` to negate the result of the `lnt` command being run.
1 parent 4e467aa commit b8ab486

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/lnttool/submit.shtest

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/bash
2-
3-
# XFAIL: TODO-FIXME
4-
52
# RUN: rm -rf %t.instance
63
# RUN: rm -rf %t.tmp && mkdir -p %t.tmp
74
# RUN: python %{shared_inputs}/create_temp_instance.py \
@@ -100,31 +97,31 @@ lnt submit "http://localhost:9091/db_default/submitRun" "${INPUTS}/compile_submi
10097
rm -f "${OUTPUT_DIR}/submit_errors.txt"
10198

10299
echo "=== compile_submission.json badsuite" >> "${OUTPUT_DIR}/submit_errors.txt"
103-
not lnt submit "http://localhost:9091/db_default/v4/badsuite/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
100+
! lnt submit "http://localhost:9091/db_default/v4/badsuite/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
104101
# CHECK-ERRORS-LABEL: === compile_submission.json badsuite
105102
# CHECK-ERRORS: error: lnt server: Unknown test suite 'badsuite'!
106103

107104
echo "=== compile_submission.json baddb" >> "${OUTPUT_DIR}/submit_errors.txt"
108-
not lnt submit "http://localhost:9091/db_baddb/v4/compile/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
105+
! lnt submit "http://localhost:9091/db_baddb/v4/compile/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
109106
# CHECK_ERROR-LABEL: === compile_submission.json baddb
110107
# CHECK-ERRORS: error: lnt server: The page you are looking for does not exist.
111108

112109
echo "=== invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt"
113-
not lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
110+
! lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
114111
# CHECK-ERRORS-LABEL: === invalid_submission0.json
115112
# CHECK-ERRORS: error: lnt server: could not parse input format
116113
# ...
117114
# CHECK-ERRORS: ValueError: unable to guess input format for
118115

119116
echo "=== invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt"
120-
not lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
117+
! lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
121118
# CHECK-ERRORS-LABEL: === invalid_submission1.json
122119
# CHECK-ERRORS: error: lnt server: Invalid input format: No 'run' section in submission
123120
# ...
124121
# CHECK-ERRORS: ValueError: No 'run' section in submission
125122

126123
echo "=== compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt"
127-
not lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
124+
! lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
128125
# CHECK-ERRORS-LABEL: === compile_submission_machine_diff_reject.json
129126
# CHECK-ERRORS: error: lnt server: import failure: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
130127
# ...

0 commit comments

Comments
 (0)