From c3121f17cf4ca0940bb1c8f3ff13fc85be90d9b0 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 26 Jan 2022 22:18:46 -0500 Subject: [PATCH] Restore autoconf_false test --- build_tests/configure/autoconf_false.rb | 3 +++ spec/build_tests_spec.rb | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 build_tests/configure/autoconf_false.rb diff --git a/build_tests/configure/autoconf_false.rb b/build_tests/configure/autoconf_false.rb new file mode 100644 index 0000000..6c81396 --- /dev/null +++ b/build_tests/configure/autoconf_false.rb @@ -0,0 +1,3 @@ +autoconf false +Environment.new do |env| +end diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 89eab92..5b59040 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -2365,6 +2365,13 @@ EOF expect(result.stdout).to match /gcc.*-o.*\.o.*-DHAVE_MATH_H\s.*-DHAVE_STDIO_H/ end + it "exits with an error if the project is not configured and a build is requested and autoconf is false" do + test_dir "configure" + result = run_rscons(args: %w[-f autoconf_false.rb]) + expect(result.stderr).to match /Project must be configured before creating an Environment/ + expect(result.status).to_not eq 0 + end + it "exits with an error code and message if configuration fails during autoconf" do test_dir "configure" result = run_rscons(args: %w[-f autoconf_fail.rb])