From 1fcf5509b6154ba6da1e338d1531fc95aec4cc15 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Tue, 2 Jun 2020 23:36:58 +0200 Subject: [PATCH 1/3] =?UTF-8?q?Add=20=E2=80=9CCleaning=20up=20stage=20file?= =?UTF-8?q?s=E2=80=9D=20section=20for=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dependencies.rst | 8 ++++++++ docs/pipeline.rst | 1 + 2 files changed, 9 insertions(+) diff --git a/docs/dependencies.rst b/docs/dependencies.rst index 4f137b1589..70a5b35310 100644 --- a/docs/dependencies.rst +++ b/docs/dependencies.rst @@ -170,3 +170,11 @@ In fact, you can rewrite :func:`set_executable` function as follows: Now it's easier to understand what the ``@require_deps`` decorator does behind the scenes. It binds the function arguments to a partial realization of the :func:`getdep` function and attaches the decorated function as an after-setup hook. In fact, any ``@require_deps``-decorated function will be invoked before any other after-setup hook. + + +Cleaning up stage files +----------------------- + +Since we are assuming the output of a test might be needed by its dependent tests, the test's resources will be cleaned up only after all of its dependents have finished successfully. +In case one of its descendants has failed, the cleanup phase will not be performed at all and all the test's files will remain in the stage directory of the test. +This allows the user to reproduce the error of the failed test, since all the relevant files are in the same place. diff --git a/docs/pipeline.rst b/docs/pipeline.rst index f50060ee77..d300dbccba 100644 --- a/docs/pipeline.rst +++ b/docs/pipeline.rst @@ -91,6 +91,7 @@ The Cleanup Phase During this final stage of the pipeline, the test's resources are cleaned up. More specifically, if the test has finished successfully, all interesting test files (build/job scripts, build/job script output and any user-specified files) are copied to ReFrame's output directory and the stage directory of the test is deleted. +.. note:: This phase might be deferred in case a test has dependent test (see `Cleaning up stage files `__ for more details). Execution Policies ------------------ From 4fd9c50cf9d8d1071134149e229d8eb78ffbacfc Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 3 Jun 2020 16:03:04 +0200 Subject: [PATCH 2/3] Fine tune documentation text --- docs/dependencies.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/dependencies.rst b/docs/dependencies.rst index 70a5b35310..99fde6ad2f 100644 --- a/docs/dependencies.rst +++ b/docs/dependencies.rst @@ -175,6 +175,7 @@ In fact, any ``@require_deps``-decorated function will be invoked before any oth Cleaning up stage files ----------------------- -Since we are assuming the output of a test might be needed by its dependent tests, the test's resources will be cleaned up only after all of its dependents have finished successfully. -In case one of its descendants has failed, the cleanup phase will not be performed at all and all the test's files will remain in the stage directory of the test. -This allows the user to reproduce the error of the failed test, since all the relevant files are in the same place. +In principle, the output of a test might be needed by its dependent tests. +As a result, the stage directory of the test will only be cleaned up after all of its *immediate* dependent tests have finished successfully. +If any of its children has failed, the cleanup phase will be skipped, such that all the test's files will remain in the stage directory. +This allows users to reproduce manually the error of a failed test with dependencies, since all the needed resources of the failing test are left in their original location. From 931323db523ece84b125f47f3d617e6a6a8ad9f9 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 3 Jun 2020 16:56:42 +0200 Subject: [PATCH 3/3] Fine tune the documentation --- docs/dependencies.rst | 2 ++ docs/pipeline.rst | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/dependencies.rst b/docs/dependencies.rst index 99fde6ad2f..3f9073fdb3 100644 --- a/docs/dependencies.rst +++ b/docs/dependencies.rst @@ -172,6 +172,8 @@ It binds the function arguments to a partial realization of the :func:`getdep` f In fact, any ``@require_deps``-decorated function will be invoked before any other after-setup hook. +.. _cleaning-up-stage-files: + Cleaning up stage files ----------------------- diff --git a/docs/pipeline.rst b/docs/pipeline.rst index d300dbccba..f80a2fd7aa 100644 --- a/docs/pipeline.rst +++ b/docs/pipeline.rst @@ -91,7 +91,9 @@ The Cleanup Phase During this final stage of the pipeline, the test's resources are cleaned up. More specifically, if the test has finished successfully, all interesting test files (build/job scripts, build/job script output and any user-specified files) are copied to ReFrame's output directory and the stage directory of the test is deleted. -.. note:: This phase might be deferred in case a test has dependent test (see `Cleaning up stage files `__ for more details). +.. note:: + This phase might be deferred in case a test has dependents (see :ref:`cleaning-up-stage-files` for more details). + Execution Policies ------------------