Commit 38386df
committed
Fix running individual test files when ninja is not installed
The code in testing/framework/TestSCons.py attempted to handle an
ImportError if ninja is not available. However, when running individual
test files from the scons/test/ directory, this directory is included as
the first entry in sys.path. When this happens, the `import ninja`
statement succeeds, finding the scons/test/ninja/ directory and treating
it as a package. This results in an AttributeError being thrown later
attempting to access `ninja.BIN_DIR`, rather than an ImportError.
I have confirmed that this change now allows `./runtest.py test/Help.py`
to succeed, even when ninja is not installed.1 parent a6abb0f commit 38386df
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
113 | | - | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
0 commit comments