From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17611 invoked from network); 4 Oct 2021 10:23:10 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 4 Oct 2021 10:23:10 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 0d3c66cc; Mon, 4 Oct 2021 10:22:53 +0000 (UTC) Return-Path: Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [2a00:1450:4864:20::131]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 87ca04c0 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 4 Oct 2021 10:22:52 +0000 (UTC) Received: by mail-lf1-x131.google.com with SMTP id g41so69165766lfv.1 for ; Mon, 04 Oct 2021 03:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ofXFAz/0tEjQ4RmcDn5Mz4omywPB/ALF4YOUgegsoqE=; b=O5jwD7rapnCBFnvLcCxwosk90hW8AmzGiHRC6+y9E/XsFf00mILsAxxtBK7nyeC2jj 0K50NmaatYFAvfmcZ1ZIUabGIboX84m9ZAnt2inRYllH6GpilTkdMIMh9UCacUWv48uI bQDGjiLiKD92x8QfP44+hdjsXCjbd5DrkQ/15FE+U4nHwUnZyaW7n+lHdO+S1ffk2+df rwVY0fJq7TeJUWS6SJT+Soom3zhr+FcP7V8aUz1q/TJUgrl2rjaUtjCwTihEh6mN2BgH YauIFADWNwYkeZ4Dkpi8UpkuSXJZ6tQIV6ZOX3VRYYZddphrIlTcPqGXBfG9mOufbKuR QBPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ofXFAz/0tEjQ4RmcDn5Mz4omywPB/ALF4YOUgegsoqE=; b=0Sr1OGaN9ijYArVRfsXCKdPbcJEq4oWUqbHi8lmPWu1RDBD4st/0hURRyJdetOr9kK 771o9/Rq0YouTwtIrXE5t4VsCjpmDSSXhIiTCKn2hflC7d35ttmyPR34pUQaNtihTG8S LxY/j3+Q/d2sPdtChHrpspgKG3yWENsPbGG5YzNcPm5w7x5Ol3xIRVgYhVZqvUXbj2u6 z6NT7Fsls3i8YZwTCxWYdLsK9mKgQOaEknq+C8/KzdGZccxC3HddhuAE5zgzGt4uYq2z z9exqkwOUyjCRZxv6RhzcY6rQFufOa7v/jcJn/x7J2H2zfr6a+btABc51Uuggc2Wo2+T 10Jw== X-Gm-Message-State: AOAM530Dx/LBP5NDntSBahjEoY4F25ZvcKxfCVoMUJr0zL1rOlbmXvoJ e12wEXXK54T1VZ4xWho8EB4zr3KbjJI= X-Google-Smtp-Source: ABdhPJyzdaTV1oKdojk1L5gEbfKtcqkQ4ggMKcpKH6x1UcIWzXTsyWZX/dqphvRQJ56fpzKUJ6rmmw== X-Received: by 2002:a2e:9b13:: with SMTP id u19mr15552871lji.39.1633342971656; Mon, 04 Oct 2021 03:22:51 -0700 (PDT) Return-Path: Received: from pony.bronevichok.ru ([79.164.223.111]) by smtp.gmail.com with ESMTPSA id e2sm1566667ljj.118.2021.10.04.03.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 03:22:51 -0700 (PDT) From: Sergey Bronnikov X-Google-Original-From: Sergey Bronnikov To: cgit@lists.zx2c4.com Cc: Sergey Bronnikov Subject: [PATCH 0/2] Support of test results Date: Mon, 4 Oct 2021 13:22:34 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" From: Sergey Bronnikov Git SCM allows to store information in so called notes [1] and cgit allows to show notes that placed to default reference ('refs/notes/commits') and attached to certain commits. It is convenient to add various useful information related to commit in Git notes. Often tests results stored for future analysis in different systems (aka 'test report systems'). But one is the logic places to store test results is a Git SCM, test report automatically connected to commits and easily available for everyone. It even can be automated using git-test [2]. How-to use: $ cat report.tap 1..2 ok 1 - test_0.py::test_list_once ok 2 - test_0.py::test_list_twice $ GIT_NOTES_REF=refs/notes/testres git notes add -F report.tap 95aa7d200ee10580c472a1156a11c726046b110f $ git notes add -m 'Tested-by: Sergey Bronnikov ' \ 2a3a0d1a62de2ae5ab4511c15d82a6a0f2c2a930 $ GIT_NOTES_REF=refs/notes/testres git show 95aa7d200ee10580c472a1156a11c726046b110f commit 95aa7d200ee10580c472a1156a11c726046b110f Author: Sergey Bronnikov Date: Tue Dec 22 10:06:10 2020 +0300 ... Notes (testres): 1..2 ok 1 - test_0.py::test_list_once ok 2 - test_0.py::test_list_twice Test report become available in cgit by clicking to href 'tests' for that commit. 1. https://git-scm.com/docs/git-notes 2. https://github.com/ligurio/git-test 3. https://github.com/ligurio/testres/wiki/Using-GIT-as-a-storage Sergey Bronnikov (2): ui-commit: add support of test results ui-commit: add testres filter cgit.c | 6 +++ cgit.h | 4 +- cgitrc.5.txt | 17 +++++++++ cmd.c | 8 +++- filter.c | 6 +++ filters/testres-example.lua | 21 +++++++++++ shared.c | 1 + tests/setup.sh | 2 + tests/t0105-commit.sh | 7 ++++ tests/t0111-filter.sh | 8 ++++ ui-commit.c | 73 ++++++++++++++++++++++++++++++++++++- ui-commit.h | 1 + ui-shared.c | 8 +++- ui-shared.h | 3 ++ 14 files changed, 161 insertions(+), 4 deletions(-) create mode 100755 filters/testres-example.lua -- 2.25.1