Fixing tool_option test for new scpath
- Some unhealthy scpath manipulations in the core logic caused previous test to pass.
- Now that we removed those hacks,  the test fails theyw ay it should b/c the test doesn't properly take into account the fact that pytest runs in a different dir.
+import os
import siliconcompiler
if __name__ != "__main__":
@@ -9,7 +10,8 @@ def test_tool_option():
early.'''
chip = siliconcompiler.Chip()
- gcd_ex_dir = 'examples/gcd/'
+ gcd_ex_dir = os.path.abspath(__file__)
+ gcd_ex_dir = gcd_ex_dir[:gcd_ex_dir.rfind('/tests/quick_tests/asic')] + '/examples/gcd/'
# Inserting value into configuration
chip.set('design', 'gcd', clobber=True)
@@ -41,3 +43,6 @@ def test_tool_option():
# Run the chip's build process synchronously.
chip.run()
+
+if __name__ == "__main__":
+ test_tool_option()
