From 1ecce7e99ea55ac11085e43ccb2e66a94491bbab Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 29 Nov 2018 22:02:42 -0500 Subject: [PATCH] add configure spec to check as much as possible --- build_tests/configure/everything.rb | 13 +++++++++++++ spec/build_tests_spec.rb | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 build_tests/configure/everything.rb diff --git a/build_tests/configure/everything.rb b/build_tests/configure/everything.rb new file mode 100644 index 0000000..006827c --- /dev/null +++ b/build_tests/configure/everything.rb @@ -0,0 +1,13 @@ +project_name "configure test" +autoconf false +configure do + check_c_compiler + check_cxx_compiler + check_d_compiler + check_cfg package: "mypackage" + check_c_header "stdio.h" + check_cxx_header "iostream" + check_d_import "std.stdio" + check_lib "m" + check_program "ls" +end diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index b45a85c..8cfad5d 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -1866,6 +1866,26 @@ EOF end end end + + it "does everything" do + test_dir "configure" + create_exe "pkg-config", "echo '-DMYPACKAGE'" + result = run_rscons(rsconscript: "everything.rb", op: %w[configure --build=bb]) + expect(result.stderr).to eq "" + expect(result.status).to eq 0 + expect(result.stdout).to match /Configuring configure test\.\.\./ + #TODO + #expect(result.stdout).to match /Setting build directory\.\.\. bb/ + expect(result.stdout).to match /Checking for C compiler\.\.\. gcc/ + expect(result.stdout).to match /Checking for C\+\+ compiler\.\.\. g++/ + expect(result.stdout).to match /Checking for D compiler\.\.\. gdc/ + expect(result.stdout).to match /Checking for package 'mypackage'\.\.\. found/ + expect(result.stdout).to match /Checking for C header 'stdio.h'\.\.\. found/ + expect(result.stdout).to match /Checking for C\+\+ header 'iostream'\.\.\. found/ + expect(result.stdout).to match /Checking for D import 'std.stdio'\.\.\. found/ + expect(result.stdout).to match /Checking for library 'm'\.\.\. found/ + expect(result.stdout).to match /Checking for program 'ls'\.\.\. .*ls/ + end end end