From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.user Subject: unit tests best practice Date: Thu, 3 Jan 2019 17:53:33 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1546534363 8307 195.159.176.226 (3 Jan 2019 16:52:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 16:52:43 +0000 (UTC) To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jan 03 17:52:39 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from listsout.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf6EZ-00023j-EO for guile-user@m.gmane.org; Thu, 03 Jan 2019 17:52:39 +0100 Original-Received: from localhost ([127.0.0.1]:56132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf6Gf-0004oO-92 for guile-user@m.gmane.org; Thu, 03 Jan 2019 11:54:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf6Fg-0004I5-CN for guile-user@gnu.org; Thu, 03 Jan 2019 11:53:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf6Ff-0008B7-BC for guile-user@gnu.org; Thu, 03 Jan 2019 11:53:48 -0500 Original-Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]:44706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf6Ff-0008Af-6Y for guile-user@gnu.org; Thu, 03 Jan 2019 11:53:47 -0500 Original-Received: by mail-yb1-xb33.google.com with SMTP id e1so9135245ybn.11 for ; Thu, 03 Jan 2019 08:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=9xxywgpjNv+TQxGVAHLBde9Mxmc08ANUZjs/GZFLSXc=; b=UMHi+MoPR3g7Z4FI7tWz3eJwRJ+kKHvXvPGs7FStpEJrvCQGX83tP91+CVc0FcWh2/ rvCiREUO87Z7LWuRVaPdiUYJk9KPjok7HptwNzypxmmOygdEesULQ9YsuMZQ8ISugxzQ m6ftiSCLqRFnJPrtWyddM+u8Tg1THI0IlsNERw4Rq26OpAik1qwDTTwSqFtY5/8G11VD HoQzS4LodKrFO1wKE8Gb/MsJBmelxuDQ9SDdU7ZCWMWozR7F2Db4+rsjLfjhY6rGmTiZ cHOzSEneXZdkPhS6Hgw1tcmAaMsEbjiB2XwuqD/v4dDfHVIFk3lJ6JngjLj6YpJODrjg Lc1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9xxywgpjNv+TQxGVAHLBde9Mxmc08ANUZjs/GZFLSXc=; b=dXxixQnJ60U6XO88y2oFM38To0125dKTNqZ3WCGJj6zXJrpVjg/tyc009CRp5P3RNO 0e7kIHGEgw7RrLLvse23BzpjuoPPai+Y2TQbap2i0Ya0d2/KgtziABUjCsQs/bUoKjLH fqZZdDCpIwQzN4G6VzmP3VH7LHTCzQEz0+uO1OolNdPYNkcoVAoAUuNz1zs1XJhhMqd8 JtT0xFTG0IR5LFxfTRUtPqXAybwDdQzPdhyBCCnPc7pj1JJVIKd+lfhTRoWPO/W1OBQU mk2mD/397OCtHvS0OHrEdrqVv0CkCdpFoktxQ51K/6BGKkplU+502okm91jOzTZKNNYR n16A== X-Gm-Message-State: AJcUukdfkqOENtn06lp6yZYpGFa7Awx2MJMmCPNY/VM7Ys38iBHHIF07 FI1zxrMrY6rrCn0Xk498Eg9uzj3jNB+p2tMVlUIL/3U= X-Google-Smtp-Source: ALg8bN5V0lKzr/zeIzGhpu/UcQosuaWY5acrZmLbbRU1dxj4oEL9b3LfoKF3qJ2dUyzsUFCdf4BWXkusuWafLRy4BO4= X-Received: by 2002:a25:ba01:: with SMTP id t1mr15331580ybg.296.1546534426122; Thu, 03 Jan 2019 08:53:46 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b33 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15190 Archived-At: Wat's the best practice to instrument a Guile based project for running unit tests ? guile-git has this fragment in the Makefile.am file SCM_LOG_DRIVER = \ $(top_builddir)/pre-inst-env \ $(GUILE) --no-auto-compile -e main \ $(top_srcdir)/build-aux/test-driver.scm as you can see, what Automake produces calls a "main" procedure in a "test-driver.scm" script in the "build-aux" folder The effect is that you can call make check in the root folder and have the tests run Instead, in the Makefile.am file produced by guile-hall wired projects you ave this fragment AM_TESTS_ENVIRONMENT = abs_top_srcdir=\"$(abs_top_srcdir)\" SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE) AM_SCM_LOG_FLAGS = --no-auto-compile -L \"$(top_srcdir)\" so there's a SCM_LOG_COMPILER instead of a SCM_LOG_DRIVER What is this LOG_COMPILER doing, exactly ? This is what the test-env file contains #!/bin/sh \"@abs_top_builddir@/pre-inst-env\" \"$@\" exit $? what is this ? What does this do ? Alex admits he goes full cargo culting when dealing with the Autotools, in fact there's this comment line at the beginning of the section producing the Autotools related files in guile-hall ;;;; Full on cargo cult! So, if there's any kind soul here willing to clarify/illustrate what is going on we could make the effort to condensate such knowledge in guile-hall Improving the experience in dealing with Guile based project would be a great progress One last thing test-driver uses the API provided by srfi-64 to actually run the tests and display the results Does Guile provide a standard version of such script ? Should Guile provide one ?