ci-automation/tapfile_helper_lib: fix commiting last transaction

Move the final db commit to inside the subshell. Since the while loop
runs inside a subshell, the SQL variable outside of the subshell is not
modified, and so the last contents of the SQL variable are dropped. This
shows up when the last couple test cases don't have an error message,
and simply append the transaction to 'SQL'. They are never written to
the db.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2022-03-10 08:25:42 +01:00
parent 0c8d96edaa
commit 25cf7c4fc5

View File

@ -160,10 +160,9 @@ function tap_ingest_tapfile() {
fi
done < "$tapfile"
SQL="${SQL}COMMIT;"
__sqlite3_wrapper "${SQL}"
)
SQL="${SQL}COMMIT;"
__sqlite3_wrapper "${SQL}"
}
# --