mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-06 09:17:42 +02:00
Some fixes for the testsuite
With these fixes, unit tests pass with MacOS (set DYLD_LIBRARY_PATH!) 1.) MacOS takes popen vs. pclose seriously By using fopen we basically spoil the system and other popen won't work. 2.) For system integrity, MacOS does not propagate DYLD_LIBRARY_PATH to child processes such as sh. This has to be done explictly. 3.) Search the klayout binary in the right path (klayout.app/...) 4.) Reset KLAYOUT_HOME for less intervention by installed macros
This commit is contained in:
Vendored
+18
-1
@@ -30,8 +30,25 @@ load("test_prologue.rb")
|
||||
|
||||
class KLayoutMain_TestClass < TestBase
|
||||
|
||||
def setup
|
||||
@klayout_home_name = "KLAYOUT_HOME"
|
||||
@klayout_home = ENV[@klayout_home_name]
|
||||
# setting "KLAYOUT_HOME" to empty means we don't search any place
|
||||
# for macros
|
||||
ENV[@klayout_home_name] = ""
|
||||
end
|
||||
|
||||
def teardown
|
||||
ENV[@klayout_home_name] = @klayout_home
|
||||
end
|
||||
|
||||
def klayout_bin
|
||||
File.join(RBA::Application::instance.inst_path, "klayout")
|
||||
# special location for MacOS
|
||||
file = File.join(RBA::Application::instance.inst_path, "klayout.app", "Contents", "MacOS", "klayout")
|
||||
if !File.exists?(file)
|
||||
file = File.join(RBA::Application::instance.inst_path, "klayout")
|
||||
end
|
||||
return file
|
||||
end
|
||||
|
||||
def test_1
|
||||
|
||||
Reference in New Issue
Block a user