17db96d56Sopenharmony_ciimport sys 27db96d56Sopenharmony_ci 37db96d56Sopenharmony_ci# This is a test module for Python. It looks in the standard 47db96d56Sopenharmony_ci# places for various *.py files. If these are moved, you must 57db96d56Sopenharmony_ci# change this module too. 67db96d56Sopenharmony_ci 77db96d56Sopenharmony_citry: 87db96d56Sopenharmony_ci import os 97db96d56Sopenharmony_ciexcept: 107db96d56Sopenharmony_ci print("""Could not import the standard "os" module. 117db96d56Sopenharmony_ci Please check your PYTHONPATH environment variable.""") 127db96d56Sopenharmony_ci sys.exit(1) 137db96d56Sopenharmony_ci 147db96d56Sopenharmony_citry: 157db96d56Sopenharmony_ci import symbol 167db96d56Sopenharmony_ciexcept: 177db96d56Sopenharmony_ci print("""Could not import the standard "symbol" module. If this is 187db96d56Sopenharmony_ci a PC, you should add the dos_8x3 directory to your PYTHONPATH.""") 197db96d56Sopenharmony_ci sys.exit(1) 207db96d56Sopenharmony_ci 217db96d56Sopenharmony_cifor dir in sys.path: 227db96d56Sopenharmony_ci file = os.path.join(dir, "os.py") 237db96d56Sopenharmony_ci if os.path.isfile(file): 247db96d56Sopenharmony_ci test = os.path.join(dir, "test") 257db96d56Sopenharmony_ci if os.path.isdir(test): 267db96d56Sopenharmony_ci # Add the "test" directory to PYTHONPATH. 277db96d56Sopenharmony_ci sys.path = sys.path + [test] 287db96d56Sopenharmony_ci 297db96d56Sopenharmony_ciimport libregrtest # Standard Python tester. 307db96d56Sopenharmony_cilibregrtest.main() 31