Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pb/test flake #20492

Draft
wants to merge 6 commits into
base: main-2.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions sdk/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,7 @@ start_postgresql

echo "Running bazel test with the following tag filters: ${tag_filter}"

$bazel test //... \
--build_tag_filters "${tag_filter}" \
--test_tag_filters "${tag_filter}" \
--test_env "POSTGRESQL_HOST=${POSTGRESQL_HOST}" \
--test_env "POSTGRESQL_PORT=${POSTGRESQL_PORT}" \
--test_env "POSTGRESQL_USERNAME=${POSTGRESQL_USERNAME}" \
--test_env "POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD}" \
--profile test-profile.json \
--experimental_profile_include_target_label \
--build_event_json_file test-events.json \
--build_event_publish_all_actions \
--execution_log_json_file "$ARTIFACT_DIRS/logs/test_execution${execution_log_postfix}.json.gz"
$bazel test //compiler/damlc/tests:data-dependencies-lf1 --runs_per_test=60

# Make sure that Bazel query works.
$bazel query 'deps(//...)' >/dev/null
Expand Down
8 changes: 5 additions & 3 deletions sdk/compiler/damlc/tests/src/DA/Test/DataDependencies.hs
Original file line number Diff line number Diff line change
Expand Up @@ -735,20 +735,22 @@ tests TestArgs{..} =
-- , " submit bob $ exercise coid1 Module.Choice2 with choiceArg = ()"
-- , " pure ()"
]
callProcessSilent genSimpleDalf $
callProcess genSimpleDalf $
["--with-archive-choice" | withArchiveChoice ] <>
["--lf-version", LF.renderVersion simpleDalfLfVersion
, projDir </> "simple-dalf-1.0.0.dalf"]
callProcessSilent damlc
callProcess damlc
[ "build"
, "--debug"
, "--project-root", projDir
, "--target"
, LF.renderVersion targetDevVersion
, "--generated-src" ]
let dar = projDir </> ".daml/dist/proj-0.1.0.dar"
assertFileExists dar
callProcessSilent damlc
callProcess damlc
[ "test"
, "--debug"
, "--target"
, LF.renderVersion targetDevVersion
, "--project-root"
Expand Down
8 changes: 8 additions & 0 deletions sdk/libs-haskell/test-utils/DA/Test/Process.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module DA.Test.Process
, callCommandSilent
, callCommandSilentIn
, callCommandSilentWithEnvIn
, callProcess
, subprocessEnv
) where

Expand All @@ -24,6 +25,13 @@ import qualified Data.Set as S

newtype ShouldSucceed = ShouldSucceed Bool

callProcess :: FilePath -> [String] -> IO ()
callProcess cmd args = do
(out,err) <- run (ShouldSucceed True) (proc cmd args)
hPutStrLn stderr $ unwords (["running", cmd] ++ args)
hPutStrLn stderr $ unlines ["stdout: ", out]
hPutStrLn stderr $ unlines ["stderr: ", err]

callProcessSilent :: FilePath -> [String] -> IO ()
callProcessSilent cmd args =
void $ run (ShouldSucceed True) (proc cmd args)
Expand Down
Loading