Skip to content

Commit e62092e

Browse files
Do not crash if os gem is not installed, but just skip mac tests
1 parent e864728 commit e62092e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/update_suite.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# gobopt environment variable can be used to override goblint defaults and PARAMs
44

5-
require 'os'
65
require 'find'
76
require 'fileutils'
87
require 'timeout'
@@ -576,7 +575,14 @@ def run ()
576575
end
577576
end
578577

579-
mac = OS.mac?
578+
maybemac = true
579+
580+
begin
581+
require 'os'
582+
maybemac = OS.mac?
583+
rescue LoadError => e
584+
puts "Missing os gem (install with: gem install os), skipping tests that do not work on mac"
585+
end
580586

581587
#processing the file information
582588
projects = []
@@ -606,7 +612,7 @@ def run ()
606612
lines = IO.readlines(path, :encoding => "UTF-8")
607613

608614
next if not future and only.nil? and lines[0] =~ /SKIP/
609-
next if mac and lines[0] =~ /NOMAC/
615+
next if maybemac and lines[0] =~ /NOMAC/
610616
next if marshal and lines[0] =~ /NOMARSHAL/
611617
next if not has_linux_headers and lines[0] =~ /kernel/
612618
if incremental then

0 commit comments

Comments
 (0)