CI: Fix finding test script
authorJeffery To <redacted>
Mon, 17 Jul 2023 09:02:30 +0000 (17:02 +0800)
committerJeffery To <redacted>
Mon, 17 Jul 2023 12:17:44 +0000 (20:17 +0800)
commit5422bd621836e361bcb49c427f888fe3a8df267c
treeeb2f9f2bc260e7e399a9b03df252d03a2524a8e1
parent0174cea69757589be50b9dd774394ce18cf61dae
CI: Fix finding test script

Currently, the run-test code tries to find the package source directory
based on the directory name only. This fails for the Go compiler package
because there is more than one directory named "golang".

This uses the full path listed in the "Source:" line of the control file
to find the package source directory.

This also:

* Checks for the test script earlier, to avoid installing and removing
  ipk files when there is no test script to be run

* Makes PKG_VERSION parsing more lenient, as the package may not have a
  PKG_RELEASE, e.g. attendedsysupgrade-common

Signed-off-by: Jeffery To <redacted>
.github/workflows/entrypoint.sh
git clone https://git.99rst.org/PROJECT