engine.py 628 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #
  5. import datetime
  6. import os
  7. import pprint
  8. import random
  9. import re
  10. import shlex
  11. import subprocess
  12. import signal
  13. import sys
  14. import time
  15. from .test_utils import *
  16. from .test_api import *
  17. def read_cases_from_file(file_path):
  18. if not os.path.exists(file_path):
  19. return False, None
  20. with open(file_path, 'r') as f:
  21. content = f.readlines()
  22. content = [x.strip() for x in content]
  23. print content
  24. if len(content) == 0:
  25. return False, None
  26. return True, content