{"thread":{"id":"57096","subject":"[PATCH] CI: remove support for Azure CI","startedAt":"2021-12-17T00:05:28Z","lastAt":"2021-12-20T19:08:17Z","messageCount":4,"participants":["Ævar Arnfjörð Bjarmason","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"444288","messageId":"patch-1.1-eec0a8c3164-20211217T000418Z-avarab@gmail.com","threadId":"57096","inReplyTo":null,"subject":"[PATCH] CI: remove support for Azure CI","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-12-17T00:04:56Z","receivedAt":"2021-12-17T00:05:28Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove various code required to support Azure CI. Recently in\n4a6e4b96026 (CI: remove Travis CI support, 2021-11-23) we removed the\nTravis CI support, which was last used in June 2021.\n\nThe supporting infrastructure for Azure CI was already partially\nremoved in 6081d3898fe (ci: retire the Azure Pipelines definition,\n2020-04-11). As that commit notes:\n\n    We have GitHub Actions now. Running the same builds and tests in Azure\n    Pipelines would be redundant, and a waste of energy.\n\nThis follow-up removes the relevant Azure Pipelines-only supporting\ncode. Most of it was added in commits merged as part of\n57cbc53d3e0 (Merge branch 'js/vsts-ci', 2019-02-06).\n\nThe motivation for this change is wanting to make some test-lib.sh\nchanges. If we don't remove the Azure-specific JUnit code changing\nanything to do with writing the test TAP output will also need to\nwrite out corresponding JUnit. I'd rather not figure out how to patch\ndead code, so let's just remove it.\n\nThe \"BREW_INSTALL_PACKAGES\" variable being removed here was added in\nb011fabd6e0 (ci/lib.sh: encapsulate Travis-specific things,\n2019-01-27), but its last user went away in my 4a6e4b96026 (CI: remove\nTravis CI support, 2021-11-23).\n\nI had an RFC proposal to do some of this a while ago by generating the\nJUnit via tap2junit[1]. Johannes had an objection to it on the basis\nthat if we resurrected the JUnit support in some form he'd prefer not\nto run Perl on Windows[2] (which tap2junit is implemented in).\n\nI have local WIP patches in C (via a new test-tool helper) to parse\nthe TAP output. That'll allow us to emit to any arbitrary targets,\nincluding JUnit. So given that this is currently unused I'd prefer to\ntake this step first. The unsubmitted series to get that TAP parser\nworking would run into the same chicken & egg problem with needing to\nconcern itself with the JUnit output.\n\nNote that the code being modified in \"t/helper/test-run-command.c\"\ncould also be entirely removed. It has been unused since\n4c2c38e800f (ci: modification of main.yml to use cmake for vs-build\njob, 2020-06-26). Before that in 6081d3898fe (ci: retire the Azure\nPipelines definition, 2020-04-11) the Azure Pipelines stopped using\nit. Per the discussion starting at [3] there are some future plans to\nmake use of it again, so let's keep it for now.\n\n1. https://lore.kernel.org/git/20210309160219.13779-8-avarab@gmail.com/\n2. https://lore.kernel.org/git/nycvar.QRO.7.76.6.2103221429200.50@tvgsbejvaqbjf.bet\n3. https://lore.kernel.org/git/patch-1.1-d1e464da0a9-20210906T002938Z-avarab@gmail.com/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Makefile                    |   1 -\n ci/install-dependencies.sh  |   2 -\n ci/lib.sh                   |  24 +-------\n ci/print-test-failures.sh   |   5 --\n t/helper/test-date.c        |  12 ----\n t/helper/test-path-utils.c  |  21 -------\n t/helper/test-run-command.c |   6 +-\n t/helper/test-tool.c        |   1 -\n t/helper/test-tool.h        |   1 -\n t/helper/test-xml-encode.c  |  80 -------------------------\n t/test-lib.sh               | 113 ------------------------------------\n 11 files changed, 2 insertions(+), 264 deletions(-)\n delete mode 100644 t/helper/test-xml-encode.c\n\ndiff --git a/Makefile b/Makefile\nindex 9c00a793e47..0c86d8cfbb7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -756,7 +756,6 @@ TEST_BUILTINS_OBJS += test-userdiff.o\n TEST_BUILTINS_OBJS += test-wildmatch.o\n TEST_BUILTINS_OBJS += test-windows-named-pipe.o\n TEST_BUILTINS_OBJS += test-write-cache.o\n-TEST_BUILTINS_OBJS += test-xml-encode.o\n \n # Do not add more tests here unless they have extra dependencies. Add\n # them in TEST_BUILTINS_OBJS above.\ndiff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\nindex dbcebad2fb2..1d7bf82fdfb 100755\n--- a/ci/install-dependencies.sh\n+++ b/ci/install-dependencies.sh\n@@ -34,8 +34,6 @@ macos-latest)\n \texport HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1\n \t# Uncomment this if you want to run perf tests:\n \t# brew install gnu-time\n-\ttest -z \"$BREW_INSTALL_PACKAGES\" ||\n-\tbrew install $BREW_INSTALL_PACKAGES\n \tbrew link --force gettext\n \tbrew install --cask --no-quarantine perforce || {\n \t\t# Update the definitions and try again\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 9d28ab50fb4..6765868fd73 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -91,29 +91,7 @@ export MAKEFLAGS=\n # and installing dependencies.\n set -ex\n \n-if test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n-then\n-\tCI_TYPE=azure-pipelines\n-\t# We are running in Azure Pipelines\n-\tCI_BRANCH=\"$BUILD_SOURCEBRANCH\"\n-\tCI_COMMIT=\"$BUILD_SOURCEVERSION\"\n-\tCI_JOB_ID=\"$BUILD_BUILDID\"\n-\tCI_JOB_NUMBER=\"$BUILD_BUILDNUMBER\"\n-\tCI_OS_NAME=\"$(echo \"$AGENT_OS\" | tr A-Z a-z)\"\n-\ttest darwin != \"$CI_OS_NAME\" || CI_OS_NAME=osx\n-\tCI_REPO_SLUG=\"$(expr \"$BUILD_REPOSITORY_URI\" : '.*/\\([^/]*/[^/]*\\)$')\"\n-\tCC=\"${CC:-gcc}\"\n-\n-\t# use a subdirectory of the cache dir (because the file share is shared\n-\t# among *all* phases)\n-\tcache_dir=\"$HOME/test-cache/$SYSTEM_PHASENAME\"\n-\n-\texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n-\texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n-\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n-\ttest windows_nt != \"$CI_OS_NAME\" ||\n-\tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n-elif test true = \"$GITHUB_ACTIONS\"\n+if test true = \"$GITHUB_ACTIONS\"\n then\n \tCI_TYPE=github-actions\n \tCI_BRANCH=\"$GITHUB_REF\"\ndiff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh\nindex 57277eefcd0..4582add11d0 100755\n--- a/ci/print-test-failures.sh\n+++ b/ci/print-test-failures.sh\n@@ -39,11 +39,6 @@ do\n \t\ttest_name=\"${test_name##*/}\"\n \t\ttrash_dir=\"trash directory.$test_name\"\n \t\tcase \"$CI_TYPE\" in\n-\t\tazure-pipelines)\n-\t\t\tmkdir -p failed-test-artifacts\n-\t\t\tmv \"$trash_dir\" failed-test-artifacts\n-\t\t\tcontinue\n-\t\t\t;;\n \t\tgithub-actions)\n \t\t\tmkdir -p failed-test-artifacts\n \t\t\techo \"FAILED_TEST_ARTIFACTS=t/failed-test-artifacts\" >>$GITHUB_ENV\ndiff --git a/t/helper/test-date.c b/t/helper/test-date.c\nindex 099eff4f0fc..ebf133943b3 100644\n--- a/t/helper/test-date.c\n+++ b/t/helper/test-date.c\n@@ -8,7 +8,6 @@ static const char *usage_msg = \"\\n\"\n \"  test-tool date parse [date]...\\n\"\n \"  test-tool date approxidate [date]...\\n\"\n \"  test-tool date timestamp [date]...\\n\"\n-\"  test-tool date getnanos [start-nanos]\\n\"\n \"  test-tool date is64bit\\n\"\n \"  test-tool date time_t-is64bit\\n\";\n \n@@ -92,15 +91,6 @@ static void parse_approx_timestamp(const char **argv)\n \t}\n }\n \n-static void getnanos(const char **argv)\n-{\n-\tdouble seconds = getnanotime() / 1.0e9;\n-\n-\tif (*argv)\n-\t\tseconds -= strtod(*argv, NULL);\n-\tprintf(\"%lf\\n\", seconds);\n-}\n-\n int cmd__date(int argc, const char **argv)\n {\n \tconst char *x;\n@@ -120,8 +110,6 @@ int cmd__date(int argc, const char **argv)\n \t\tparse_approxidate(argv+1);\n \telse if (!strcmp(*argv, \"timestamp\"))\n \t\tparse_approx_timestamp(argv+1);\n-\telse if (!strcmp(*argv, \"getnanos\"))\n-\t\tgetnanos(argv+1);\n \telse if (!strcmp(*argv, \"is64bit\"))\n \t\treturn sizeof(timestamp_t) == 8 ? 0 : 1;\n \telse if (!strcmp(*argv, \"time_t-is64bit\"))\ndiff --git a/t/helper/test-path-utils.c b/t/helper/test-path-utils.c\nindex 229ed416b0e..2137513c474 100644\n--- a/t/helper/test-path-utils.c\n+++ b/t/helper/test-path-utils.c\n@@ -427,27 +427,6 @@ int cmd__path_utils(int argc, const char **argv)\n \t\treturn !!res;\n \t}\n \n-\tif (argc == 4 && !strcmp(argv[1], \"skip-n-bytes\")) {\n-\t\tint fd = open(argv[2], O_RDONLY), offset = atoi(argv[3]);\n-\t\tchar buffer[65536];\n-\n-\t\tif (fd < 0)\n-\t\t\tdie_errno(\"could not open '%s'\", argv[2]);\n-\t\tif (lseek(fd, offset, SEEK_SET) < 0)\n-\t\t\tdie_errno(\"could not skip %d bytes\", offset);\n-\t\tfor (;;) {\n-\t\t\tssize_t count = read(fd, buffer, sizeof(buffer));\n-\t\t\tif (count < 0)\n-\t\t\t\tdie_errno(\"could not read '%s'\", argv[2]);\n-\t\t\tif (!count)\n-\t\t\t\tbreak;\n-\t\t\tif (write(1, buffer, count) < 0)\n-\t\t\t\tdie_errno(\"could not write to stdout\");\n-\t\t}\n-\t\tclose(fd);\n-\t\treturn 0;\n-\t}\n-\n \tif (argc > 5 && !strcmp(argv[1], \"slice-tests\")) {\n \t\tint res = 0;\n \t\tlong offset, stride, i;\ndiff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c\nindex 913775a14b7..c43670ad464 100644\n--- a/t/helper/test-run-command.c\n+++ b/t/helper/test-run-command.c\n@@ -58,7 +58,7 @@ static int task_finished(int result,\n struct testsuite {\n \tstruct string_list tests, failed;\n \tint next;\n-\tint quiet, immediate, verbose, verbose_log, trace, write_junit_xml;\n+\tint quiet, immediate, verbose, verbose_log, trace;\n };\n #define TESTSUITE_INIT { \\\n \t.tests = STRING_LIST_INIT_DUP, \\\n@@ -85,8 +85,6 @@ static int next_test(struct child_process *cp, struct strbuf *err, void *cb,\n \t\tstrvec_push(&cp->args, \"-V\");\n \tif (suite->trace)\n \t\tstrvec_push(&cp->args, \"-x\");\n-\tif (suite->write_junit_xml)\n-\t\tstrvec_push(&cp->args, \"--write-junit-xml\");\n \n \tstrbuf_addf(err, \"Output of '%s':\\n\", test);\n \t*task_cb = (void *)test;\n@@ -139,8 +137,6 @@ static int testsuite(int argc, const char **argv)\n \t\tOPT_BOOL('V', \"verbose-log\", &suite.verbose_log,\n \t\t\t \"be verbose, redirected to a file\"),\n \t\tOPT_BOOL('x', \"trace\", &suite.trace, \"trace shell commands\"),\n-\t\tOPT_BOOL(0, \"write-junit-xml\", &suite.write_junit_xml,\n-\t\t\t \"write JUnit-style XML files\"),\n \t\tOPT_END()\n \t};\n \ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex 338a57b104d..c4b0d061fd0 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -80,7 +80,6 @@ static struct test_cmd cmds[] = {\n \t{ \"trace2\", cmd__trace2 },\n \t{ \"userdiff\", cmd__userdiff },\n \t{ \"urlmatch-normalization\", cmd__urlmatch_normalization },\n-\t{ \"xml-encode\", cmd__xml_encode },\n \t{ \"wildmatch\", cmd__wildmatch },\n #ifdef GIT_WINDOWS_NATIVE\n \t{ \"windows-named-pipe\", cmd__windows_named_pipe },\ndiff --git a/t/helper/test-tool.h b/t/helper/test-tool.h\nindex 48cee1f4a2d..4763f473aba 100644\n--- a/t/helper/test-tool.h\n+++ b/t/helper/test-tool.h\n@@ -70,7 +70,6 @@ int cmd__subprocess(int argc, const char **argv);\n int cmd__trace2(int argc, const char **argv);\n int cmd__userdiff(int argc, const char **argv);\n int cmd__urlmatch_normalization(int argc, const char **argv);\n-int cmd__xml_encode(int argc, const char **argv);\n int cmd__wildmatch(int argc, const char **argv);\n #ifdef GIT_WINDOWS_NATIVE\n int cmd__windows_named_pipe(int argc, const char **argv);\ndiff --git a/t/helper/test-xml-encode.c b/t/helper/test-xml-encode.c\ndeleted file mode 100644\nindex a648bbd961c..00000000000\n--- a/t/helper/test-xml-encode.c\n+++ /dev/null\n@@ -1,80 +0,0 @@\n-#include \"test-tool.h\"\n-\n-static const char *utf8_replace_character = \"&#xfffd;\";\n-\n-/*\n- * Encodes (possibly incorrect) UTF-8 on <stdin> to <stdout>, to be embedded\n- * in an XML file.\n- */\n-int cmd__xml_encode(int argc, const char **argv)\n-{\n-\tunsigned char buf[1024], tmp[4], *tmp2 = NULL;\n-\tssize_t cur = 0, len = 1, remaining = 0;\n-\tunsigned char ch;\n-\n-\tfor (;;) {\n-\t\tif (++cur == len) {\n-\t\t\tlen = xread(0, buf, sizeof(buf));\n-\t\t\tif (!len)\n-\t\t\t\treturn 0;\n-\t\t\tif (len < 0)\n-\t\t\t\tdie_errno(\"Could not read <stdin>\");\n-\t\t\tcur = 0;\n-\t\t}\n-\t\tch = buf[cur];\n-\n-\t\tif (tmp2) {\n-\t\t\tif ((ch & 0xc0) != 0x80) {\n-\t\t\t\tfputs(utf8_replace_character, stdout);\n-\t\t\t\ttmp2 = NULL;\n-\t\t\t\tcur--;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t\t*tmp2 = ch;\n-\t\t\ttmp2++;\n-\t\t\tif (--remaining == 0) {\n-\t\t\t\tfwrite(tmp, tmp2 - tmp, 1, stdout);\n-\t\t\t\ttmp2 = NULL;\n-\t\t\t}\n-\t\t\tcontinue;\n-\t\t}\n-\n-\t\tif (!(ch & 0x80)) {\n-\t\t\t/* 0xxxxxxx */\n-\t\t\tif (ch == '&')\n-\t\t\t\tfputs(\"&amp;\", stdout);\n-\t\t\telse if (ch == '\\'')\n-\t\t\t\tfputs(\"&apos;\", stdout);\n-\t\t\telse if (ch == '\"')\n-\t\t\t\tfputs(\"&quot;\", stdout);\n-\t\t\telse if (ch == '<')\n-\t\t\t\tfputs(\"&lt;\", stdout);\n-\t\t\telse if (ch == '>')\n-\t\t\t\tfputs(\"&gt;\", stdout);\n-\t\t\telse if (ch >= 0x20)\n-\t\t\t\tfputc(ch, stdout);\n-\t\t\telse if (ch == 0x09 || ch == 0x0a || ch == 0x0d)\n-\t\t\t\tfprintf(stdout, \"&#x%02x;\", ch);\n-\t\t\telse\n-\t\t\t\tfputs(utf8_replace_character, stdout);\n-\t\t} else if ((ch & 0xe0) == 0xc0) {\n-\t\t\t/* 110XXXXx 10xxxxxx */\n-\t\t\ttmp[0] = ch;\n-\t\t\tremaining = 1;\n-\t\t\ttmp2 = tmp + 1;\n-\t\t} else if ((ch & 0xf0) == 0xe0) {\n-\t\t\t/* 1110XXXX 10Xxxxxx 10xxxxxx */\n-\t\t\ttmp[0] = ch;\n-\t\t\tremaining = 2;\n-\t\t\ttmp2 = tmp + 1;\n-\t\t} else if ((ch & 0xf8) == 0xf0) {\n-\t\t\t/* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */\n-\t\t\ttmp[0] = ch;\n-\t\t\tremaining = 3;\n-\t\t\ttmp2 = tmp + 1;\n-\t\t} else\n-\t\t\tfputs(utf8_replace_character, stdout);\n-\t}\n-\n-\treturn 0;\n-}\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0f7a137c7d8..be5452b263c 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -165,9 +165,6 @@ parse_option () {\n \t\tverbose_log=t\n \t\ttee=t\n \t\t;;\n-\t--write-junit-xml)\n-\t\twrite_junit_xml=t\n-\t\t;;\n \t--stress)\n \t\tstress=t ;;\n \t--stress=*)\n@@ -613,7 +610,6 @@ exec 6<&0\n exec 7>&2\n \n _error_exit () {\n-\tfinalize_junit_xml\n \tGIT_EXIT_OK=t\n \texit 1\n }\n@@ -723,35 +719,11 @@ trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP\n # the test_expect_* functions instead.\n \n test_ok_ () {\n-\tif test -n \"$write_junit_xml\"\n-\tthen\n-\t\twrite_junit_xml_testcase \"$*\"\n-\tfi\n \ttest_success=$(($test_success + 1))\n \tsay_color \"\" \"ok $test_count - $@\"\n }\n \n test_failure_ () {\n-\tif test -n \"$write_junit_xml\"\n-\tthen\n-\t\tjunit_insert=\"<failure message=\\\"not ok $test_count -\"\n-\t\tjunit_insert=\"$junit_insert $(xml_attr_encode \"$1\")\\\">\"\n-\t\tjunit_insert=\"$junit_insert $(xml_attr_encode \\\n-\t\t\t\"$(if test -n \"$GIT_TEST_TEE_OUTPUT_FILE\"\n-\t\t\t   then\n-\t\t\t\ttest-tool path-utils skip-n-bytes \\\n-\t\t\t\t\t\"$GIT_TEST_TEE_OUTPUT_FILE\" $GIT_TEST_TEE_OFFSET\n-\t\t\t   else\n-\t\t\t\tprintf '%s\\n' \"$@\" | sed 1d\n-\t\t\t   fi)\")\"\n-\t\tjunit_insert=\"$junit_insert</failure>\"\n-\t\tif test -n \"$GIT_TEST_TEE_OUTPUT_FILE\"\n-\t\tthen\n-\t\t\tjunit_insert=\"$junit_insert<system-err>$(xml_attr_encode \\\n-\t\t\t\t\"$(cat \"$GIT_TEST_TEE_OUTPUT_FILE\")\")</system-err>\"\n-\t\tfi\n-\t\twrite_junit_xml_testcase \"$1\" \"      $junit_insert\"\n-\tfi\n \ttest_failure=$(($test_failure + 1))\n \tsay_color error \"not ok $test_count - $1\"\n \tshift\n@@ -760,19 +732,11 @@ test_failure_ () {\n }\n \n test_known_broken_ok_ () {\n-\tif test -n \"$write_junit_xml\"\n-\tthen\n-\t\twrite_junit_xml_testcase \"$* (breakage fixed)\"\n-\tfi\n \ttest_fixed=$(($test_fixed+1))\n \tsay_color error \"ok $test_count - $@ # TODO known breakage vanished\"\n }\n \n test_known_broken_failure_ () {\n-\tif test -n \"$write_junit_xml\"\n-\tthen\n-\t\twrite_junit_xml_testcase \"$* (known breakage)\"\n-\tfi\n \ttest_broken=$(($test_broken+1))\n \tsay_color warn \"not ok $test_count - $@ # TODO known breakage\"\n }\n@@ -1049,10 +1013,6 @@ test_start_ () {\n \ttest_count=$(($test_count+1))\n \tmaybe_setup_verbose\n \tmaybe_setup_valgrind\n-\tif test -n \"$write_junit_xml\"\n-\tthen\n-\t\tjunit_start=$(test-tool date getnanos)\n-\tfi\n }\n \n test_finish_ () {\n@@ -1103,13 +1063,6 @@ test_skip () {\n \n \tcase \"$to_skip\" in\n \tt)\n-\t\tif test -n \"$write_junit_xml\"\n-\t\tthen\n-\t\t\tmessage=\"$(xml_attr_encode \"$skipped_reason\")\"\n-\t\t\twrite_junit_xml_testcase \"$1\" \\\n-\t\t\t\t\"      <skipped message=\\\"$message\\\" />\"\n-\t\tfi\n-\n \t\tsay_color skip \"ok $test_count # skip $1 ($skipped_reason)\"\n \t\t: true\n \t\t;;\n@@ -1124,53 +1077,6 @@ test_at_end_hook_ () {\n \t:\n }\n \n-write_junit_xml () {\n-\tcase \"$1\" in\n-\t--truncate)\n-\t\t>\"$junit_xml_path\"\n-\t\tjunit_have_testcase=\n-\t\tshift\n-\t\t;;\n-\tesac\n-\tprintf '%s\\n' \"$@\" >>\"$junit_xml_path\"\n-}\n-\n-xml_attr_encode () {\n-\tprintf '%s\\n' \"$@\" | test-tool xml-encode\n-}\n-\n-write_junit_xml_testcase () {\n-\tjunit_attrs=\"name=\\\"$(xml_attr_encode \"$this_test.$test_count $1\")\\\"\"\n-\tshift\n-\tjunit_attrs=\"$junit_attrs classname=\\\"$this_test\\\"\"\n-\tjunit_attrs=\"$junit_attrs time=\\\"$(test-tool \\\n-\t\tdate getnanos $junit_start)\\\"\"\n-\twrite_junit_xml \"$(printf '%s\\n' \\\n-\t\t\"    <testcase $junit_attrs>\" \"$@\" \"    </testcase>\")\"\n-\tjunit_have_testcase=t\n-}\n-\n-finalize_junit_xml () {\n-\tif test -n \"$write_junit_xml\" && test -n \"$junit_xml_path\"\n-\tthen\n-\t\ttest -n \"$junit_have_testcase\" || {\n-\t\t\tjunit_start=$(test-tool date getnanos)\n-\t\t\twrite_junit_xml_testcase \"all tests skipped\"\n-\t\t}\n-\n-\t\t# adjust the overall time\n-\t\tjunit_time=$(test-tool date getnanos $junit_suite_start)\n-\t\tsed -e \"s/\\(<testsuite.*\\) time=\\\"[^\\\"]*\\\"/\\1/\" \\\n-\t\t\t-e \"s/<testsuite [^>]*/& time=\\\"$junit_time\\\"/\" \\\n-\t\t\t-e '/^ *<\\/testsuite/d' \\\n-\t\t\t<\"$junit_xml_path\" >\"$junit_xml_path.new\"\n-\t\tmv \"$junit_xml_path.new\" \"$junit_xml_path\"\n-\n-\t\twrite_junit_xml \"  </testsuite>\" \"</testsuites>\"\n-\t\twrite_junit_xml=\n-\tfi\n-}\n-\n test_atexit_cleanup=:\n test_atexit_handler () {\n \t# In a succeeding test script 'test_atexit_handler' is invoked\n@@ -1193,8 +1099,6 @@ test_done () {\n \t# removed, so the commands can access pidfiles and socket files.\n \ttest_atexit_handler\n \n-\tfinalize_junit_xml\n-\n \tif test -z \"$HARNESS_ACTIVE\"\n \tthen\n \t\tmkdir -p \"$TEST_RESULTS_DIR\"\n@@ -1484,23 +1388,6 @@ fi\n # in subprocesses like git equals our $PWD (for pathname comparisons).\n cd -P \"$TRASH_DIRECTORY\" || exit 1\n \n-if test -n \"$write_junit_xml\"\n-then\n-\tjunit_xml_dir=\"$TEST_OUTPUT_DIRECTORY/out\"\n-\tmkdir -p \"$junit_xml_dir\"\n-\tjunit_xml_base=${0##*/}\n-\tjunit_xml_path=\"$junit_xml_dir/TEST-${junit_xml_base%.sh}.xml\"\n-\tjunit_attrs=\"name=\\\"${junit_xml_base%.sh}\\\"\"\n-\tjunit_attrs=\"$junit_attrs timestamp=\\\"$(TZ=UTC \\\n-\t\tdate +%Y-%m-%dT%H:%M:%S)\\\"\"\n-\twrite_junit_xml --truncate \"<testsuites>\" \"  <testsuite $junit_attrs>\"\n-\tjunit_suite_start=$(test-tool date getnanos)\n-\tif test -n \"$GIT_TEST_TEE_OUTPUT_FILE\"\n-\tthen\n-\t\tGIT_TEST_TEE_OFFSET=0\n-\tfi\n-fi\n-\n # Convenience\n # A regexp to match 5 and 35 hexdigits\n _x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n-- \n2.34.1.1119.g7a3fc8778ee\n\n"},{"id":"444510","messageId":"nycvar.QRO.7.76.6.2112201834050.347@tvgsbejvaqbjf.bet","threadId":"57096","inReplyTo":"patch-1.1-eec0a8c3164-20211217T000418Z-avarab@gmail.com","subject":"Re: [PATCH] CI: remove support for Azure CI","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-12-20T17:38:04Z","receivedAt":"2021-12-20T17:38:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Fri, 17 Dec 2021, Ævar Arnfjörð Bjarmason wrote:\n\n> Remove various code required to support Azure CI. Recently in\n> 4a6e4b96026 (CI: remove Travis CI support, 2021-11-23) we removed the\n> Travis CI support, which was last used in June 2021.\n>\n> The supporting infrastructure for Azure CI was already partially\n> removed in 6081d3898fe (ci: retire the Azure Pipelines definition,\n> 2020-04-11). As that commit notes:\n>\n>     We have GitHub Actions now. Running the same builds and tests in Azure\n>     Pipelines would be redundant, and a waste of energy.\n>\n> This follow-up removes the relevant Azure Pipelines-only supporting\n> code. Most of it was added in commits merged as part of\n> 57cbc53d3e0 (Merge branch 'js/vsts-ci', 2019-02-06).\n\nIt feels premature to remove the remnants of Azure Pipelines support\nalready now. It would be better to hold off a little, as much fun as\ndeleting and refactoring code may be for some of us.\n\nThe reason is that there are still some things that Azure Pipelines can do\nthat GitHub workflows cannot, for example:\n\n- present the logs of failed tests in an intuitive manner,\n\n- re-run _only_ failed jobs.\n\nAt this stage, I am not convinced yet that we should bet completely on\nGitHub workflows.\n\nCiao,\nJohannes\n"},{"id":"444512","messageId":"211220.864k73uoua.gmgdl@evledraar.gmail.com","threadId":"57096","inReplyTo":"nycvar.QRO.7.76.6.2112201834050.347@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] CI: remove support for Azure CI","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-12-20T18:05:31Z","receivedAt":"2021-12-20T18:13:22Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Dec 20 2021, Johannes Schindelin wrote:\n\n> Hi Ævar,\n>\n> On Fri, 17 Dec 2021, Ævar Arnfjörð Bjarmason wrote:\n>\n>> Remove various code required to support Azure CI. Recently in\n>> 4a6e4b96026 (CI: remove Travis CI support, 2021-11-23) we removed the\n>> Travis CI support, which was last used in June 2021.\n>>\n>> The supporting infrastructure for Azure CI was already partially\n>> removed in 6081d3898fe (ci: retire the Azure Pipelines definition,\n>> 2020-04-11). As that commit notes:\n>>\n>>     We have GitHub Actions now. Running the same builds and tests in Azure\n>>     Pipelines would be redundant, and a waste of energy.\n>>\n>> This follow-up removes the relevant Azure Pipelines-only supporting\n>> code. Most of it was added in commits merged as part of\n>> 57cbc53d3e0 (Merge branch 'js/vsts-ci', 2019-02-06).\n>\n> It feels premature to remove the remnants of Azure Pipelines support\n> already now. It would be better to hold off a little, as much fun as\n> deleting and refactoring code may be for some of us.\n>\n> The reason is that there are still some things that Azure Pipelines can do\n> that GitHub workflows cannot, for example:\n>\n> - present the logs of failed tests in an intuitive manner,\n>\n> - re-run _only_ failed jobs.\n>\n> At this stage, I am not convinced yet that we should bet completely on\n> GitHub workflows.\n\nI think these concerns should be addressed by the rest of the commit\nmessage that follows the paragraph you quoted.\n\nI.e. I'm not deleting this for fun, but because certain improvements to\ntest-lib.sh require patching the JUnit emitter.\n\nSince there is no current user of it or a way to test it against a\nworking CI mode such changes are harder to make and to review.\n\nThose changes being things I've got locally that achieve some of the\nsame aims you note here. I.e. getting guaranteed machine-parsability of\nthe test-lib.sh TAP output, to e.g. present failing tests intuitively.\n\nMy 707d2f2fe86 (CI: use \"$runs_on_pool\", not \"$jobname\" to select\npackages & config, 2021-11-23) also shows that by removing these dead or\nunused modes it becomes easier to make the CI less GitHub-dependant.\n\nI'd like to follow-up with that and e.g. make the \"install *.deb\npackages\" step of CI be something you can trivially invoke via a\ncorresponding \"make\" target, and generally make the commands and checks\nwe run in CI a much thinner wrapper for targets you can easily run\nlocally without mocking up a bunch of fake values for ci/lib.sh\nfirst. The changes in ci/* here are a small step towards that,\ni.e. fewer (and in this case, not easily testable) special-cases we need\nto worry about.\n"},{"id":"444521","messageId":"xmqqwnjzw0v9.fsf@gitster.g","threadId":"57096","inReplyTo":"nycvar.QRO.7.76.6.2112201834050.347@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] CI: remove support for Azure CI","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-12-20T19:08:10Z","receivedAt":"2021-12-20T19:08:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> It feels premature to remove the remnants of Azure Pipelines support\n> already now. It would be better to hold off a little, as much fun as\n> deleting and refactoring code may be for some of us.\n\nSome of us? ;-)\n\n> The reason is that there are still some things that Azure Pipelines can do\n> that GitHub workflows cannot, for example:\n>\n> - present the logs of failed tests in an intuitive manner,\n>\n> - re-run _only_ failed jobs.\n>\n> At this stage, I am not convinced yet that we should bet completely on\n> GitHub workflows.\n\nHearing directly from somebody who knows how Azure thing is used by\nthis project is a good sanity check for me.  Thanks.\n"}]}