Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFtkk-005gIM-3B for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 13:05:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFtkk-001tjH-0V for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 13:05:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFtkj-001tj9-2p for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 13:05:57 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFtkh-00000002eTQ-2kVi for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 13:05:57 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4891d7164ddso28477365e9.3 for ; Thu, 23 Apr 2026 06:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776949555; x=1777554355; darn=lists.postgresql.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=68Nw4fZZRhcgihBNqNjzT/8Nu126Qz8zk6IBKtwiGnQ=; b=NnBI/WFDXUuZKj8fDTlKf0513A9nFjWG703TIME9X1aypxAmptlLuEeQkex6kKKy6J +tc2OrOXs/dzjSZRmmVPNMv8ApceeDNNuPHq7avrrpwAKDTVnBzEzi+WC1mTejAiT9uk 40D5ZYcKd4IPs5/6Arna9EtzyzFJn++j7KgLWQG1sumSo67yznaEojimm7zpm2BzRqUB fRVRy5BWZV+6XhteHV+gazQHkb6ahf+f0PbnC1BFhQgCVpvd8MvciUo2sDqh+DOdpsox WXQ2Juwd1xgfnUe0Vf5RECBGbrSoulDCcLPYiptDWdMcozriUlpFo+YsnCicmzb0nSDM nXOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776949555; x=1777554355; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=68Nw4fZZRhcgihBNqNjzT/8Nu126Qz8zk6IBKtwiGnQ=; b=I9ZGWj3fsSy+fZ9zpfq6PdWd6pZ59AWxGlA0INQUPbh/ZmzhM+nuvoOmNdewnykHlI veWdnpGkriKJmwd8YoUdt5dq313Ls3I1AELiFuG3hWQyqkZVbbIMfTPJ0DcVjVpdCPbz RY4TzT0t5MICZUO9hUJESY/OyDUat/+cQOYU+BTNQB0vyA7eZa3MaBh9PhWyGdCzcvzo kMcBe3LJFk0s6hcHyvlUb4pRIJ4Ky6CaBM2ANOXppqRSSf/IedtclXli/biauqnvK8ZA A1UoZqHCLfpSCANHtnRScGLn5LoKDk3mhdwAZlP4Lzn+0Ulhubt99PeG35THtDne/s/1 RM0Q== X-Gm-Message-State: AOJu0Yza7fhUFLWjTLs2uWeoqUkQF5vPeC6jM4p6gKSdO83ChrZ0YUez M2feBX/6MwWMcYhw802todRew7PYurteBfCA2CUBhnR0nMtXGDTwJVhNbvwRrQ== X-Gm-Gg: AeBDieuVji13/Fsm8vGwWMVM4KRdYvCYz3Tb42h+NRnD4Tbpu3qsevUXtSZCFbLQxee cd0l47TcHJQP9+zxGlmD+lsqevmpNByTXGKljUH0nZjNlBtOIQWMrGCRAS1/DJxwrIAvaVIzvW6 hYRyJOZPhilDFd+MWyM/T4wgUSYTJ9PeCFSoj8gsiHZ8EL83EpeQhOWfNF/5VO0IT5ghWroGLlo nnXxnsXrJVA9FFkblcwx1LFUYMpOBJ7OMKf/JzziEXKd86Yx5SBohh4uz1RGKIarVkQwIx/Xl0k fKFZiuoARWFDaEk5NJSBsTAaLXetItcAf9MQBH3byjKpvERVSzWhw1Xgr+mJtZoG2CTLREXIQft VND+xox133jmPFolvn1z2pVGs/6+U8fNnEt8oAo0/naIX+t2TFPAtbLF44QBt8Hk0x19eJI+MB/ vjikko4k+0Vrqu6GRAH+v283xll6ebNmh+zBcuoeYDgz2TgeMt/43yc5LoD9MxhtaxHevgo2wGZ 4O7Iu8lcXPgfSmEMs6oAw== X-Received: by 2002:a05:600c:8b38:b0:487:59c:2bb8 with SMTP id 5b1f17b1804b1-488fb7925dcmr375604965e9.27.1776949554641; Thu, 23 Apr 2026 06:05:54 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4891df9e50asm255862225e9.0.2026.04.23.06.05.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:05:54 -0700 (PDT) Date: Thu, 23 Apr 2026 13:05:52 +0000 From: Bertrand Drouvot To: pgsql-hackers@lists.postgresql.org Subject: meson/testwrap: support EXTRA_REGRESS_OPTS environment variable Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3WyonmA85JeTPG5k" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3WyonmA85JeTPG5k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi hackers, While looking at [1], I did use the pg_regress --use-existing flag that way: TESTS="test_setup create_index memoize --use-existing" meson test -C meson_build --setup running --suite regress-running and that produced the desired outcome (i.e running those 3 tests from the regress suite on a running instance and existing regression database). That was kind of a trick and not surprisingly when I wanted to run the entire regress suite that way: TESTS="--use-existing" meson test -C meson_build --setup running --suite regress-running things did not work as expected and produced: 1/1 regress-running - postgresql:regress-running/regress SKIP 0.04s Ok: 0 Fail: 0 Skipped: 1 means it skipped the tests. OTOH, with autoconf, one could run: EXTRA_REGRESS_OPTS="--use-existing" make installcheck and that would work as expected (means running the entire regress suite on an existing regression database). So it looks like that currently (unless I missed it), with meson, it is not possible to run an entire test suite on a running instance and existing regression database. Indeed, setting the TESTS environment variable replaces the schedule and test list entirely. This means that passing only pg_regress flags (e.g., TESTS="--use-existing") results in no tests being run, since no schedule or test names are included. The attached patch adds support for EXTRA_REGRESS_OPTS in testwrap. When set, its contents are appended to the test command for regress, isolation, and ecpg test types, matching autoconf behavior. This enables running the full schedule with extra pg_regress options, like: EXTRA_REGRESS_OPTS="--use-existing" meson test --setup running --suite regress-running Once we agree on a fix and that fix is pushed, I think it would make sense to add an example in [2]. [1]: https://postgr.es/m/aekGK/SUIeW5n5fY%40bdtpg [2]: https://wiki.postgresql.org/wiki/Meson Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --3WyonmA85JeTPG5k Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-testwrap-support-EXTRA_REGRESS_OPTS-environment-v.patch"