mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
regexp-generator: Include these generated tests in make.py
This is necessary so that updates to the tests without corresponding updates to the generator script will be flagged in CI runs.
This commit is contained in:
parent
031ed02ad1
commit
684aec777f
5
.github/workflows/checks.yml
vendored
5
.github/workflows/checks.yml
vendored
@ -72,6 +72,11 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r tools/generation/requirements.txt
|
pip install -r tools/generation/requirements.txt
|
||||||
|
|
||||||
|
- name: Install dependencies for regexp-generator tool
|
||||||
|
run: |
|
||||||
|
cd tools/regexp-generator
|
||||||
|
npm install
|
||||||
|
|
||||||
- name: Build tests
|
- name: Build tests
|
||||||
run: |
|
run: |
|
||||||
./make.py clean >/dev/null
|
./make.py clean >/dev/null
|
||||||
|
18
make.py
18
make.py
@ -8,8 +8,10 @@ import os, shutil, subprocess, sys
|
|||||||
OUT_DIR = os.environ.get('OUT_DIR') or 'test'
|
OUT_DIR = os.environ.get('OUT_DIR') or 'test'
|
||||||
SRC_DIR = os.environ.get('SRC_DIR') or 'src'
|
SRC_DIR = os.environ.get('SRC_DIR') or 'src'
|
||||||
|
|
||||||
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)
|
cmd_str = ' '.join(args)
|
||||||
|
|
||||||
print('> ' + cmd_str)
|
print('> ' + cmd_str)
|
||||||
@ -36,17 +38,27 @@ def target(*deps):
|
|||||||
return wrapped
|
return wrapped
|
||||||
return other
|
return other
|
||||||
|
|
||||||
|
|
||||||
@target()
|
@target()
|
||||||
|
def npm_deps():
|
||||||
|
shell('npm', 'install', cwd='./tools/regexp-generator')
|
||||||
|
|
||||||
|
|
||||||
|
@target('npm_deps')
|
||||||
def build():
|
def build():
|
||||||
shell(sys.executable, 'tools/generation/generator.py',
|
shell(sys.executable, 'tools/generation/generator.py',
|
||||||
'create',
|
'create',
|
||||||
'--parents',
|
'--parents',
|
||||||
'--out', OUT_DIR,
|
'--out', OUT_DIR,
|
||||||
SRC_DIR)
|
SRC_DIR)
|
||||||
|
shell('npm', 'run', 'build', cwd='./tools/regexp-generator')
|
||||||
|
|
||||||
@target()
|
|
||||||
|
@target('npm_deps')
|
||||||
def clean():
|
def clean():
|
||||||
shell(sys.executable, 'tools/generation/generator.py', 'clean', OUT_DIR)
|
shell(sys.executable, 'tools/generation/generator.py', 'clean', OUT_DIR)
|
||||||
|
shell('npm', 'run', 'clean', cwd='./tools/regexp-generator')
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
targets['build']()
|
targets['build']()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user