2006-03-01 14:28:58 +08:00
|
|
|
import sys
|
|
|
|
|
|
|
|
# This is a test module for Python. It looks in the standard
|
|
|
|
# places for various *.py files. If these are moved, you must
|
|
|
|
# change this module too.
|
|
|
|
|
|
|
|
try:
|
2006-04-21 18:40:58 +08:00
|
|
|
import os
|
2006-03-01 14:28:58 +08:00
|
|
|
except:
|
2007-08-31 02:50:25 +08:00
|
|
|
print("""Could not import the standard "os" module.
|
|
|
|
Please check your PYTHONPATH environment variable.""")
|
2006-03-01 14:28:58 +08:00
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
try:
|
2006-04-21 18:40:58 +08:00
|
|
|
import symbol
|
2006-03-01 14:28:58 +08:00
|
|
|
except:
|
2007-08-31 02:50:25 +08:00
|
|
|
print("""Could not import the standard "symbol" module. If this is
|
|
|
|
a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
|
2006-03-01 14:28:58 +08:00
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
for dir in sys.path:
|
2006-04-21 18:40:58 +08:00
|
|
|
file = os.path.join(dir, "os.py")
|
2006-03-01 14:28:58 +08:00
|
|
|
if os.path.isfile(file):
|
|
|
|
test = os.path.join(dir, "test")
|
|
|
|
if os.path.isdir(test):
|
|
|
|
# Add the "test" directory to PYTHONPATH.
|
|
|
|
sys.path = sys.path + [test]
|
|
|
|
|
2016-03-25 00:53:20 +08:00
|
|
|
import libregrtest # Standard Python tester.
|
|
|
|
libregrtest.main()
|