Skip to content

Commit

Permalink
Drop use of Kyua
Browse files Browse the repository at this point in the history
We don't need Kyua to run the tests in this package.  We can instead
rely on Automake's own test runner, which is much simpler to do and
reduces overall complexity.
  • Loading branch information
jmmv committed Oct 7, 2023
1 parent cd80ea5 commit 3e10cfd
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 245 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@
set -e -x

readonly SHELL_NAME="${1}"; shift
readonly PREFIX="${1}"; shift

if [ -d "${PREFIX}/share/aclocal" ]; then
autoreconf -isv -I"${PREFIX}/share/aclocal"
else
autoreconf -isv
fi
autoreconf -isv

shell_path="$(which ${SHELL_NAME})"
if [ ${?} -ne 0 ]; then
Expand All @@ -45,7 +40,4 @@ if [ ${?} -ne 0 ]; then
fi
./configure SHTK_SHELL="${shell_path}"

f=
f="${f} PKG_CONFIG_PATH='${PREFIX}/lib/pkgconfig'"
f="${f} SHTK_SHELL='${shell_path}'"
make distcheck DISTCHECK_CONFIGURE_FLAGS="${f}"
make distcheck DISTCHECK_CONFIGURE_FLAGS="SHTK_SHELL='${shell_path}'"
69 changes: 0 additions & 69 deletions .github/workflows/install-kyua.sh

This file was deleted.

56 changes: 8 additions & 48 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,53 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install bash
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh bash ~/kyua
- run: ./.github/workflows/build.sh bash

bash-cvs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install bash
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh bash ~/kyua
- run: ./.github/workflows/build.sh bash

dash-nothing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install dash
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh dash ~/kyua
- run: ./.github/workflows/build.sh dash

dash-cvs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install dash
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh dash ~/kyua
- run: ./.github/workflows/build.sh dash

mksh-nothing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install mksh
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh ksh ~/kyua
- run: ./.github/workflows/build.sh ksh

mksh-cvs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install mksh
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh ksh ~/kyua
- run: ./.github/workflows/build.sh ksh

zsh-nothing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install zsh
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh zsh ~/kyua
- run: ./.github/workflows/build.sh zsh

zsh-cvs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install zsh
- uses: actions/cache@v2
with:
path: ~/kyua
key: kyua-${{ runner.os }}-${{ hashFiles('.github/workflows/install-kyua.sh') }}
- run: ./.github/workflows/install-kyua.sh ~/kyua
- run: ./.github/workflows/build.sh zsh ~/kyua
- run: ./.github/workflows/build.sh zsh
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
*_inttest
*_inttest.log
*_inttest.trs
*_test
*_test.log
*_test.trs
Makefile
Makefile.in
aclocal.m4
admin/install-sh
admin/missing
admin/test-driver
autom4te.cache
config.log
config.status
Expand All @@ -13,4 +18,5 @@ man/shtk.1
man/shtk_import.3
shtk
shtk.pc
test-suite.log
version.subr
32 changes: 10 additions & 22 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,11 @@ Or alternatively, install as a regular user into your home directory:
Dependencies
------------

To build and use shtk successfully you need:
To build, use and test shtk successfully you need:

* A POSIX-compliant shell. Any of bash, dash, pdksh and zsh are known to
be supported. Old and broken shells are explicitly not supported.

Optionally, if you want to build and run the tests (recommended), you need:

* pkg-config.
* Kyua 0.6 or greater.

If you are building shtk from the code on the repository, you will also
need the following tools:

Expand Down Expand Up @@ -70,15 +65,13 @@ To build and install the source package, you must follow these steps:
installation prefix. More details on this procedure are given on a
later section.

2. Build the sources to generate the binaries and scripts. Simply run
`make` on the sources' top directory after configuring them. No
problems should arise.

3. Install the library by running `make install'` You may need to become
root to issue this step.
2. Build the sources to generate the binaries and scripts. Run `make` on
the sources' top directory after configuring them.

3. Check that the library works before installation by running `make check`.

4. Issue any manual installation steps that may be required. These are
described later in their own section.
4. Install the library by running `make install'`. You may need to become
root to issue this step depending on the installation prefix you chose.

5. Check that the installed library works by running `make installcheck`.
You do not need to be root to do this.
Expand Down Expand Up @@ -111,16 +104,11 @@ script:
Specifies the absolute path to the shell interpreter to be used by shtk.


Run the tests!
Reporting bugs
--------------

Lastly, after a successful installation (and assuming you have Kyua
installed in your system), you should periodically run the tests from the
final location to ensure things remain stable. Do so as follows:

$ kyua test -k /usr/local/tests/shtk/Kyuafile

And if you see any tests fail, do not hesitate to report them in:
If you have any problem during installation, please do not hesitate to
report it at:

https://github.com/jmmv/shtk/issues/

Expand Down
20 changes: 0 additions & 20 deletions Kyuafile

This file was deleted.

Loading

0 comments on commit 3e10cfd

Please sign in to comment.