{"thread":{"id":"41260","subject":"[PATCH v2 0/2] travis-ci: run previously failed tests first, then slowest to fastest","startedAt":"2016-01-26T09:53:41Z","lastAt":"2016-01-26T18:44:17Z","messageCount":4,"participants":["larsxschneider@gmail.com","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"276777","messageId":"1453802023-85055-1-git-send-email-larsxschneider@gmail.com","threadId":"41260","inReplyTo":null,"subject":"[PATCH v2 0/2] travis-ci: run previously failed tests first, then slowest to fastest","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-01-26T09:53:41Z","receivedAt":"2016-01-26T09:53:41Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\ndiff to v1:\n    - improve the commit message ($gmane/284465)\n    - rename the Travis cache directory from $HOME/.prove-cache to\n      $HOME/travis-cache for clarity\n    - explicitly use container-based infrastructure ($gmane/284432)\n\nThanks Mike, Jeff, and Junio for the review!\n\nCheers,\nLars\n\nLars Schneider (2):\n  travis-ci: run previously failed tests first, then slowest to fastest\n  travis-ci: explicity use container-based infrastructure\n\n .travis.yml | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)\n\n--\n2.5.1\n"},{"id":"276779","messageId":"1453802023-85055-2-git-send-email-larsxschneider@gmail.com","threadId":"41260","inReplyTo":"1453802023-85055-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v2 1/2] travis-ci: run previously failed tests first, then slowest to fastest","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-01-26T09:53:42Z","receivedAt":"2016-01-26T09:53:42Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nThe Travis-CI machines are in a clean state in the beginning of every run\n(transient by default). Use the Travis-CI cache feature to make the prove\nstate persistent across consecutive Travis-CI runs on the same branch.\nThis allows to run previously failed tests first and run remaining tests\nin slowest to fastest order. As a result it is less likely that Travis-CI\nneeds to wait for a single test at the end which speeds up the test suite\nexecution by ~2 min.\n\nTravis-CI can only cache entire directories. Prove stores the .prove file\nalways in the t/ directory but we don't want to cache the entire t/ directory.\nTherefore we create a symlink from $HOME/travis-cache/.prove to t/.prove and\ncache the $HOME/travis-cache directory.\n\nUnfortunately the cache feature is only available (for free) on the\nTravis-CI Linux environment.\n\nSuggested-by: Jeff King <peff@peff.net>\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n .travis.yml | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex c3bf9c6..610881e 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -1,5 +1,9 @@\n language: c\n \n+cache:\n+  directories:\n+    - $HOME/travis-cache\n+\n os:\n   - linux\n   - osx\n@@ -18,7 +22,7 @@ env:\n     - P4_VERSION=\"15.2\"\n     - GIT_LFS_VERSION=\"1.1.0\"\n     - DEFAULT_TEST_TARGET=prove\n-    - GIT_PROVE_OPTS=\"--timer --jobs 3\"\n+    - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n     - GIT_TEST_OPTS=\"--verbose --tee\"\n     - CFLAGS=\"-g -O2 -Wall -Werror\"\n     - GIT_TEST_CLONE_2GB=YesPlease\n@@ -67,6 +71,8 @@ before_install:\n     p4 -V | grep Rev.;\n     echo \"$(tput setaf 6)Git-LFS Version$(tput sgr0)\";\n     git-lfs version;\n+    mkdir -p $HOME/travis-cache;\n+    ln -s $HOME/travis-cache/.prove t/.prove;\n \n before_script: make --jobs=2\n \n-- \n2.5.1\n"},{"id":"276778","messageId":"1453802023-85055-3-git-send-email-larsxschneider@gmail.com","threadId":"41260","inReplyTo":"1453802023-85055-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v2 2/2] travis-ci: explicity use container-based infrastructure","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-01-26T09:53:43Z","receivedAt":"2016-01-26T09:53:43Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nSet `sudo: false` to explicitly use the (faster) container-based\ninfrastructure for the Travis-CI Linux build.\n\nMore info:\nhttps://docs.travis-ci.com/user/ci-environment/#Virtualization-environments\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n .travis.yml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 610881e..f8b73ec 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -1,5 +1,7 @@\n language: c\n \n+sudo: false\n+\n cache:\n   directories:\n     - $HOME/travis-cache\n-- \n2.5.1\n"},{"id":"276825","messageId":"xmqqk2mwcha6.fsf@gitster.mtv.corp.google.com","threadId":"41260","inReplyTo":"1453802023-85055-2-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v2 1/2] travis-ci: run previously failed tests first, then slowest to fastest","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T18:44:17Z","receivedAt":"2016-01-26T18:44:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"larsxschneider@gmail.com writes:\n\n> From: Lars Schneider <larsxschneider@gmail.com>\n>\n> The Travis-CI machines are in a clean state in the beginning of every run\n> (transient by default). Use the Travis-CI cache feature to make the prove\n> state persistent across consecutive Travis-CI runs on the same branch.\n> This allows to run previously failed tests first and run remaining tests\n> in slowest to fastest order. As a result it is less likely that Travis-CI\n> needs to wait for a single test at the end which speeds up the test suite\n> execution by ~2 min.\n>\n> Travis-CI can only cache entire directories. Prove stores the .prove file\n> always in the t/ directory but we don't want to cache the entire t/ directory.\n> Therefore we create a symlink from $HOME/travis-cache/.prove to t/.prove and\n> cache the $HOME/travis-cache directory.\n>\n> Unfortunately the cache feature is only available (for free) on the\n> Travis-CI Linux environment.\n\nThanks.  I wouldn't be confused with the above description like\nbefore.\n\nI see systems other than Linux listed in os: section; presumably our\n$HOME would not persist and we wouldn't even have $HOME/travis-cache\ndirectory when we run on them, so \"mkdir -p\" would be both necessary\nand save to have whether the \"cache\" feature is available or not.\nAnd the \"ln -s\" would be the same way--either we symlink to a file\nthat hasn't been born (either on a platform without \"cache\" feature,\nor the first run on Linux) and that is perfectly fine.\n\nAnd all the systems listed in os: section supports symlinks, so\nthe \"mkdir -p && ln -s\" is safe.\n\nLooks sensible.  Thanks.\n\n>\n> Suggested-by: Jeff King <peff@peff.net>\n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n>  .travis.yml | 8 +++++++-\n>  1 file changed, 7 insertions(+), 1 deletion(-)\n>\n> diff --git a/.travis.yml b/.travis.yml\n> index c3bf9c6..610881e 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -1,5 +1,9 @@\n>  language: c\n>  \n> +cache:\n> +  directories:\n> +    - $HOME/travis-cache\n> +\n>  os:\n>    - linux\n>    - osx\n> @@ -18,7 +22,7 @@ env:\n>      - P4_VERSION=\"15.2\"\n>      - GIT_LFS_VERSION=\"1.1.0\"\n>      - DEFAULT_TEST_TARGET=prove\n> -    - GIT_PROVE_OPTS=\"--timer --jobs 3\"\n> +    - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>      - GIT_TEST_OPTS=\"--verbose --tee\"\n>      - CFLAGS=\"-g -O2 -Wall -Werror\"\n>      - GIT_TEST_CLONE_2GB=YesPlease\n> @@ -67,6 +71,8 @@ before_install:\n>      p4 -V | grep Rev.;\n>      echo \"$(tput setaf 6)Git-LFS Version$(tput sgr0)\";\n>      git-lfs version;\n> +    mkdir -p $HOME/travis-cache;\n> +    ln -s $HOME/travis-cache/.prove t/.prove;\n>  \n>  before_script: make --jobs=2\n"}]}