From d50daa3698b60d737c64bb1ca0ee9ee57b19474d Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Wed, 19 May 2021 17:03:17 +0300 Subject: [PATCH] Initial commit for integration tests. Experimental. Playing with potential syntax --- test/integration/runner.rb | 3 +++ test/integration/tests/0-noop.rb | 4 ++++ test/integration/tests/simple.rb | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 test/integration/runner.rb create mode 100644 test/integration/tests/0-noop.rb create mode 100644 test/integration/tests/simple.rb diff --git a/test/integration/runner.rb b/test/integration/runner.rb new file mode 100644 index 0000000..31acf86 --- /dev/null +++ b/test/integration/runner.rb @@ -0,0 +1,3 @@ +Dir['tests/*.rb'].sort.each do |f| + require('./' + f) +end diff --git a/test/integration/tests/0-noop.rb b/test/integration/tests/0-noop.rb new file mode 100644 index 0000000..5eb6dc1 --- /dev/null +++ b/test/integration/tests/0-noop.rb @@ -0,0 +1,4 @@ +# this test does nothing +# it's, in a way, a test of the integration testing framework + +puts 'executing noop test' diff --git a/test/integration/tests/simple.rb b/test/integration/tests/simple.rb new file mode 100644 index 0000000..cb222f8 --- /dev/null +++ b/test/integration/tests/simple.rb @@ -0,0 +1,7 @@ +add_test('basic') { |prj| + prj.set_body <<~CMAKE + CPMAddPackage("gh:cpm-cmake/testpack-adder") + add_executable(using-adder using-adder.cpp) + target_link_libraries(using-adder PRIVATE adder) + CMAKE +}