[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Fri, 2 Jun 2023 05:13:08 -0400 (EDT) |
branch: master
commit b82596778bf653a572b5fcd483388226b29b96f3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 2 11:11:48 2023 +0200
README: Update instructions for development and testing.
* README (Requirements): Add '--expose' and explain.
(Database connection): Add example with 'pg_tmp'.
---
README | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/README b/README
index abc213e..a709c61 100644
--- a/README
+++ b/README
@@ -24,11 +24,19 @@ A convenient way to install those dependencies is to
install Guix and execute
the following command:
#+BEGIN_EXAMPLE
- guix shell -CPNW --expose=/var/run/dbus --expose=/var/log/guix/drvs
+ guix shell -CPNW --expose=/var/log/guix/drvs \
+ --expose=/var/run/dbus --export=/run/avahi-daemon
#+END_EXAMPLE
-This will build and enter an environment which provides all the necessary
-dependencies.
+This will build and enter a containarized environment which provides all the
+necessary dependencies and resources.
+
+The =-W= flag gives access to the outer =guix-daemon= and to the store, which
+is necessary when running =cuirass= to perform actual builds. Exposing
+=/var/log/guix/drvs= allows =cuirass web= to display build logs. Finally, the
+last two =--expose= flags give access to the outer =avahi-daemon=, which is
+used by =cuirass remote-server= and =cuirass remote-worker=; this is a
+requirement for =tests/remote.scm=.
* Build Instructions
@@ -65,6 +73,15 @@ To use a TCP connection, one can use:
./pre-inst-env cuirass register --database="host=127.0.0.1"
#+END_EXAMPLE
+For a test run, instead of running a full-blown PostgreSQL, you can use the
+=pg_tmp= program from [[https://eradman.com/ephemeralpg/][ephemeralpg]] like
so:
+
+#+begin_example
+ DB=$(pg_tmp)
+ ./pre-inst-env cuirass register -S examples/cuirass.scm --database=$DB &
+ ./pre-inst-env cuirass web --database=$DB
+#+end_example
+
* Run tests
Cuirass tests also require an access to a PostgreSQL database, provided by the