Skip to content

Commit

Permalink
Enable some previously disabled card.binary HIL tests. (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenroche5 authored Dec 7, 2023
1 parent 3a3a669 commit e2b029d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/notecard-binary-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,19 @@ jobs:
echo Stop Tunnelmole
[ -n "$TMOLE_PID" ] || (echo "TMOLE_PID not set" && exit 1)
[ -z "$TMOLE_PID" ] || kill $TMOLE_PID
# Remove the tmole_ready file, which may be leftover from a prior
# run.
rm -f $GITHUB_WORKSPACE/tmole_ready
- name: Start tunnelmole
uses: JarvusInnovations/background-action@v1
if: env.START_TUNNELMOLE!='false'
with:
run: |
bash ./scripts/run_tunnelmole.sh
log-output-if: true
wait-on:
# just a dummy wait-on since this is required.
file:${{github.workspace}}/tmole.log
file:${{github.workspace}}/tmole_ready

- name: Check server is available
run: |
Expand Down
3 changes: 3 additions & 0 deletions scripts/run_tunnelmole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ MD5SRV_URL=`echo "$output" | grep https | cut -d " " -f1`
echo "MD5SRV_URL=$MD5SRV_URL"
[ -n "$MD5SRV_URL" ] || (echo "Could not fetch tunnelmole URL" && exit 1)
echo "MD5SRV_URL=$MD5SRV_URL" >> $GITHUB_ENV
# Only create tmole_ready once MD5SRV_URL has been set, as the next step in the
# GitHub workflow depends on it.
touch tmole_ready
sleep 2
echo "Tunnel mole started. Writing logs to `realpath tmole.log`"
14 changes: 6 additions & 8 deletions test/hitl/card.binary/test/test_card_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ void base_test_max_length(NotecardInterface nif, const BinaryTestArgs& testArgs)
binaryTransferTest("maxlength", image, nif, 0, testArgs);
}

// TEST(test_max_length_serial)
// {
// base_test_max_length(NOTECARD_IF_SERIAL, validate);
// }
TEST(test_max_length_serial)
{
base_test_max_length(NOTECARD_IF_SERIAL, validate);
}

TEST(test_max_length_i2c)
{
Expand Down Expand Up @@ -421,15 +421,13 @@ void testsuite_card_binary()
RUN_SMOKE_TESTS(NOTECARD_IF_I2C, i2c);
set_aux_serial_baudrate();
RUN_SMOKE_TESTS(NOTECARD_IF_AUX_SERIAL, auxserial);
// RUN_SMOKE_TESTS(NOTECARD_IF_SERIAL, serial);
RUN_SMOKE_TESTS(NOTECARD_IF_SERIAL, serial);

// RUN_AUX_SERIAL_ALL_BAUDRATES(all_sevens, AllSevens, TINY_SIZE, TINY_SIZE_NAME);
// RUN_AUX_SERIAL_ALL_BAUDRATES(all_sevens, AllSevens, 4*1024, 4k);

//RUN_SIZE(all_ones, BuildAllSameValue, NOTECARD_IF_SERIAL, serial, 6*1024, 6k, 1);



#if 0
RUN_ALL_SIZES_ALL_IFACES(all_sevens, AllSevens);

Expand All @@ -440,5 +438,5 @@ void testsuite_card_binary()

RUN_FILTER(test_max_length_i2c);
RUN_FILTER(test_max_length_aux_serial);
// RUN_FILTER(test_max_length_serial);
RUN_FILTER(test_max_length_serial);
}

0 comments on commit e2b029d

Please sign in to comment.