summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 00:29:05 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 00:29:05 -0500
commit8351629c862e5a5f55e0e3a87950c5c55f995e99 (patch)
tree9184aaa4d527674f83adbb3ee7eaf0487a6f2ddf
parentd01890078c281453db8d5fc8ea7c082d0ce9782b (diff)
downloadhorizon-8351629c862e5a5f55e0e3a87950c5c55f995e99.tar.gz
horizon-8351629c862e5a5f55e0e3a87950c5c55f995e99.tar.bz2
horizon-8351629c862e5a5f55e0e3a87950c5c55f995e99.tar.xz
horizon-8351629c862e5a5f55e0e3a87950c5c55f995e99.zip
Fix tests when install env code is disabled
-rw-r--r--tests/spec/validator_spec.rb3
-rw-r--r--tools/hscript-simulate/simulator.cc7
-rw-r--r--tools/hscript-validate/validator.cc3
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb
index 36af73a..d0b9590 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -486,17 +486,20 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
it "succeeds with present disk" do
use_fixture '0078-diskid-diskid-loop0.installfile'
run_validate ' -i'
+ skip "This build does not support this test" if last_command_started.stdout =~ /runtime environment only/
expect(last_command_started).to have_output(PARSER_SUCCESS)
expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
end
it "fails with non-present disk" do
use_fixture '0079-diskid-enoent.installfile'
run_validate ' -i'
+ skip "This build does not support this test" if last_command_started.stdout =~ /runtime environment only/
expect(last_command_started).to have_output(/No such file or directory/)
end
it "fails with non-disk file" do
use_fixture '0080-diskid-tmp.installfile'
run_validate ' -i'
+ skip "This build does not support this test" if last_command_started.stdout =~ /runtime environment only/
expect(last_command_started).to have_output(/error: .*diskid.*block/)
end
it "fails with a duplicate identification device" do
diff --git a/tools/hscript-simulate/simulator.cc b/tools/hscript-simulate/simulator.cc
index 3da5cb3..45bd7e6 100644
--- a/tools/hscript-simulate/simulator.cc
+++ b/tools/hscript-simulate/simulator.cc
@@ -51,6 +51,13 @@ int main(int argc, char *argv[]) {
bold_if_pretty(std::cout);
if(!isatty(1)) std::cout << "# Generated by ";
std::cout << "HorizonScript Simulation Utility version 0.1.0";
+#ifndef HAS_INSTALL_ENV
+ std::cout << " (runtime environment only)";
+#endif
+#ifdef NON_LIBRE_FIRMWARE
+ colour_if_pretty(std::cout, "31");
+ std::cout << " (supports non-free firmware)";
+#endif
reset_if_pretty(std::cout);
std::cout << std::endl;
if(isatty(1)) { /* LCOV_EXCL_START */
diff --git a/tools/hscript-validate/validator.cc b/tools/hscript-validate/validator.cc
index 48ee62b..e1dc784 100644
--- a/tools/hscript-validate/validator.cc
+++ b/tools/hscript-validate/validator.cc
@@ -51,6 +51,9 @@ int main(int argc, char *argv[]) {
bold_if_pretty(std::cout);
std::cout << "HorizonScript Validation Utility version 0.1.0";
+#ifndef HAS_INSTALL_ENV
+ std::cout << " (runtime environment only)";
+#endif
#ifdef NON_LIBRE_FIRMWARE
colour_if_pretty(std::cout, "31");
std::cout << " (supports non-free firmware)";