Skip to content

Commit

Permalink
regexp-generator: Include these generated tests in make.py
Browse files Browse the repository at this point in the history
This is necessary so that updates to the tests without corresponding
updates to the generator script will be flagged in CI runs.
  • Loading branch information
ptomato committed Nov 2, 2024
1 parent 3b31f3c commit 90388c6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
UPSTREAM = os.environ.get('UPSTREAM') or '[email protected]:tc39/test262.git'
MAINTAINER = os.environ.get('MAINTAINER') or '[email protected]'

def shell(*args):
sp = subprocess.Popen(list(args), stdout=subprocess.PIPE, universal_newlines=True)

def shell(*args, **kwargs):
sp = subprocess.Popen(list(args), stdout=subprocess.PIPE,
universal_newlines=True, **kwargs)
cmd_str = ' '.join(args)

print('> ' + cmd_str)
Expand All @@ -38,17 +40,27 @@ def wrapped():
return wrapped
return other


@target()
def npm_deps():
shell('npm', 'install', cwd='./tools/regexp-generator')


@target('npm_deps')
def build():
shell(sys.executable, 'tools/generation/generator.py',
'create',
'--parents',
'--out', OUT_DIR,
SRC_DIR)
shell('npm', 'run', 'build', cwd='./tools/regexp-generator')

@target()

@target('npm_deps')
def clean():
shell(sys.executable, 'tools/generation/generator.py', 'clean', OUT_DIR)
shell('npm', 'run', 'clean', cwd='./tools/regexp-generator')


@target('clean', 'build')
def deploy():
Expand Down

0 comments on commit 90388c6

Please sign in to comment.