From 656436e9aeeb8b073390729d6e1da94906289970 Mon Sep 17 00:00:00 2001 From: wuhailong Date: Thu, 19 May 2022 19:23:19 +0800 Subject: [PATCH] Modify the '-m' parameter Signed-off-by: wuhailong Change-Id: Ic524e1c7e1708e91e04fd859292d3e30f6457616 --- testTs/import_tests.json | 7 +++++++ testTs/run_testTs.py | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/testTs/import_tests.json b/testTs/import_tests.json index c41307e61c..5bd054ac6d 100644 --- a/testTs/import_tests.json +++ b/testTs/import_tests.json @@ -7,5 +7,12 @@ "./testTs/test/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts", "./testTs/test/moduleResolution/scopedPackages/scopedPackages.ts", "./testTs/test/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts" + ], + "m_parameter" : [ + "./testTs/test/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts", + "./testTs/test/jsdoc/constructorTagOnClassConstructor.ts", + "./testTs/test/jsdoc/declarations/jsDeclarationsThisTypes.ts", + "./testTs/test/declarationEmit/declarationEmitWorkWithInlineComments.ts", + "./testTs/test/declarationEmit/exportDefaultNamespace.ts" ] } \ No newline at end of file diff --git a/testTs/run_testTs.py b/testTs/run_testTs.py index 74d42d7fdf..ac698d68d8 100644 --- a/testTs/run_testTs.py +++ b/testTs/run_testTs.py @@ -78,9 +78,12 @@ def run_test(file, tool,flag = False): if not os.path.exists(out_dir_path): os.makedirs(out_dir_path) try: - command_os(f'node --expose-gc {tool} -m {file} --output-type') - except: - e = str(e) + if file in IMPORT_TEST['import'] + IMPORT_TEST['m_parameter']: + command_os(['node', '--expose-gc', tool, '-m', file, '--output-type']) + else: + command_os(['node', '--expose-gc', tool, file, '--output-type']) + except BaseException as e: + print(e) if flag: for root,dirs,files in os.walk(ts_dir_path): for fi in files: -- Gitee