diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 2e55adeea776c..e2bdf5fb7ccb2 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -923,13 +923,13 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") if (onnxruntime_USE_JSEP) set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " --pre-js \"${ONNXRUNTIME_ROOT}/wasm/js_internal_api.js\"") endif() - + target_compile_options(onnxruntime_test_all PRIVATE -ggdb3) ### ### if you want to investigate or debug a test failure in onnxruntime_test_all, replace the following line. ### those flags slow down the CI test significantly, so we don't use them by default. ### - # set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=2 -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2") - set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=0 -s SAFE_HEAP=0 -s STACK_OVERFLOW_CHECK=1") + set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=2 -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2") + #set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s ASSERTIONS=0 -s SAFE_HEAP=0 -s STACK_OVERFLOW_CHECK=1") endif() if (onnxruntime_ENABLE_ATEN) diff --git a/onnxruntime/test/unittest_main/test_main.cc b/onnxruntime/test/unittest_main/test_main.cc index b5e15aefc1750..921ab8e2c6124 100644 --- a/onnxruntime/test/unittest_main/test_main.cc +++ b/onnxruntime/test/unittest_main/test_main.cc @@ -58,7 +58,7 @@ auto const placeholder = std::unique_ptr(nvinfer1::createInf std::unique_ptr ort_env; static onnxruntime::Status ortenv_setup() { - emscripten_log(EM_LOG_INFO,"XXXXXXXXXXXXXXXXXXXX:ortenv_setup start\n"); + printf("XXXXXXXXXXXXXXXXXXXX:ortenv_setup start\n"); OrtThreadingOptions tpo; onnxruntime::Status status; @@ -74,7 +74,7 @@ static onnxruntime::Status ortenv_setup() { ORT_RETURN_IF_ERROR(onnxruntime::Environment::Create(std::move(lmgr), env, &tpo, true)); std::unique_ptr env2=std::make_unique(std::move(env)); ort_env = std::make_unique(env2.release()); - emscripten_log(EM_LOG_INFO,"XXXXXXXXXXXXXXXXXXXX:ortenv_setup end\n"); + printf("XXXXXXXXXXXXXXXXXXXX:ortenv_setup end\n"); return status; } @@ -94,10 +94,10 @@ struct EmState { }; void MainLoop(void* arg) { - emscripten_log(EM_LOG_INFO, "Entering MainLoop ...\n"); + printf( "Entering MainLoop ...\n"); if (arg == nullptr) return; EmState& state = *(EmState*)arg; - emscripten_log(EM_LOG_INFO, "stage %d ...\n", (int)state.stage); + printf( "stage %d ...\n", (int)state.stage); onnxruntime::Status status; switch (state.stage) { case EmStage::INIT: { @@ -118,12 +118,12 @@ void MainLoop(void* arg) { state.stage = EmStage::FINI; break; default: - emscripten_log(EM_LOG_INFO, "Release ORT Env\n"); + printf( "Release ORT Env\n"); ort_env.reset(); emscripten_cancel_main_loop(); break; } - emscripten_log(EM_LOG_INFO, "Exiting MainLoop ...\n"); + printf( "Exiting MainLoop ...\n"); return; } diff --git a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml index e4a5fa1dad329..1b630711e96c0 100644 --- a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml @@ -57,19 +57,6 @@ jobs: displayName: 'Clean Agent Directories' condition: always() - checkout: self - - task: DownloadPipelineArtifact@2 - inputs: - artifact: '__commit' - path: $(Pipeline.Workspace) - displayName: 'Get commit SHA' - condition: eq('${{ parameters.CommitOverride }}', 'true') - - script: | - export __commit__=<$(Pipeline.Workspace)/__commit.txt - git fetch origin +$__commit__:refs/remotes/origin/$__commit__ - git checkout --force $__commit__ - workingDirectory: '$(Build.SourcesDirectory)' - displayName: 'Read commit SHA and checkout' - condition: eq('${{ parameters.CommitOverride }}', 'true') - script: | git submodule sync --recursive git submodule update --init --recursive diff --git a/tools/ci_build/github/azure-pipelines/templates/web-ci.yml b/tools/ci_build/github/azure-pipelines/templates/web-ci.yml index d4a63f8bfdafb..bed5717e1a859 100644 --- a/tools/ci_build/github/azure-pipelines/templates/web-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/web-ci.yml @@ -54,42 +54,7 @@ parameters: default: false stages: -- stage: Precheck_and_extract_commit - jobs: - - job: Precheck_and_extract_commit - pool: ${{ parameters.PoolName }} - variables: - runCodesignValidationInjection: false - timeoutInMinutes: 30 - workspace: - clean: all - steps: - - checkout: self - submodules: false - - script: | - git submodule sync -- cmake/external/onnx - git submodule update --init -- cmake/external/onnx - workingDirectory: '$(Build.SourcesDirectory)' - displayName: 'Checkout submodule onnx' - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - - template: linux-web-init-and-check.yml - - task: Bash@3 - displayName: 'Extract commit SHA and save to __commit.txt' - inputs: - targetType: 'inline' - script: | - echo $(Build.SourceVersion) - echo $(Build.SourceVersion) > "$(Build.ArtifactStagingDirectory)"/__commit.txt - - task: PublishPipelineArtifact@0 - displayName: 'Publish __commit.txt' - inputs: - artifactName: '__commit' - targetPath: '$(Build.ArtifactStagingDirectory)' - - stage: Build_wasm_Debug - dependsOn: Precheck_and_extract_commit jobs: - template: ${{ parameters.WASMTemplate }} parameters: