From 02a4742cc2fea7c0e44ef0017de355ce7bc7ff0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20R=C3=BCger?= Date: Sun, 18 Aug 2019 15:22:09 +0300 Subject: [PATCH] Backticks raise exception, who knew catching and tryig different exe name --- test/mains/test_arm.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/mains/test_arm.rb b/test/mains/test_arm.rb index 4fe96d22..16446395 100644 --- a/test/mains/test_arm.rb +++ b/test/mains/test_arm.rb @@ -28,10 +28,20 @@ module Mains end def self.has_qemu - `qemu-arm -version` - return false unless $?.exitstatus == 0 - `arm-linux-gnu-ld -v` - return false unless $?.exitstatus == 0 + qemu = "qemu-arm" + linker = "arm-linux-gnuabi-ld" + if `uname -a`.include?("torsten") + qemu = "qemu-arm" + linker = "arm-linux-gnu-ld" + #return false + end + begin + `#{qemu} -version` + `#{linker} -v` + rescue => e + puts e + return false + end true end