Skip to content

Commit

Permalink
fix(nayduck): infer path for default nayduck test_file (#4276)
Browse files Browse the repository at this point in the history
Properly link to the default test file without having to be in the `nightly` folder.
Example: `python nightly/nayduck.py`
  • Loading branch information
miraclx committed May 5, 2021
1 parent b2d61c8 commit 53ba1ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nightly/nayduck.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
from colorama import Fore


DEFAULT_TEST_FILE = 'tests_for_nayduck.txt'
DEFAULT_TEST_PATH = os.path.join(os.path.dirname(__file__), DEFAULT_TEST_FILE)

parser = argparse.ArgumentParser(description='Run tests.')
parser.add_argument('--branch', '-b', dest='branch',
help='Branch to test. By default gets current one.' )
parser.add_argument('--sha', '-s', dest='sha',
help='Sha to test. By default gets current one.')
parser.add_argument('--test_file', '-t', dest='test_file', default='tests_for_nayduck.txt',
help='Test file with list of tests. By default nayduck.txt')
parser.add_argument('--test_file', '-t', dest='test_file', default=DEFAULT_TEST_PATH,
help=f'Test file with list of tests. By default {DEFAULT_TEST_FILE}')
parser.add_argument('--run_type', '-r', dest='run_type', default='custom',
help='The type of the run. When triggered by user, the type is custom.')

Expand Down

0 comments on commit 53ba1ec

Please sign in to comment.