Skip to content

Commit

Permalink
tests: Make scheme path configurable (#18)
Browse files Browse the repository at this point in the history
This allows to run the tests against installed schemes on the system
which can then e.g. be used in Debian's autopkgtest to validate that
schemes are working as expected.

Signed-off-by: Guido Günther <[email protected]>
  • Loading branch information
agx authored Aug 28, 2024
1 parent cfbfea4 commit a26ae4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ def get_varnam_handle(scheme_id)
exit 1
end

scheme_path = ENV['TEST_SCHEME_PATH'] ||
"#{__dir__}/../schemes/#{scheme_id}"

learnings_file = Tempfile.new('learnings_file')
$handles[scheme_id] = VarnamInstance.new(
"#{__dir__}/../schemes/#{scheme_id}/#{scheme_id}.vst",
"#{scheme_path}/#{scheme_id}.vst",
learnings_file.path
)

Expand Down

0 comments on commit a26ae4c

Please sign in to comment.