summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngy döt Net <ingy@ingy.net>2020-06-02 10:21:17 -0700
committerIngy döt Net <ingy@ingy.net>2020-06-22 13:56:18 -0700
commit640717a69e37ac31f22a1c0da1e4f32795f2fb5b (patch)
tree0f83d2af9edcd65a35610aa25ca835ab04f3659f
parentacd6f6f014c25e46363e718381e0b35205df2d83 (diff)
downloadlibyaml-git-master-libyaml-test-suite.tar.gz
Run external test suites from the yaml/libyaml-test repomaster-libyaml-test-suite
-rw-r--r--.github/workflows/main.yml2
-rw-r--r--.gitignore2
-rw-r--r--.libyaml-test3
-rw-r--r--.makefile6
-rw-r--r--Makefile.am32
-rw-r--r--ReadMe.md22
-rwxr-xr-xtests/run-all-tests.sh3
7 files changed, 33 insertions, 37 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e8ec497..9f5388f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -44,7 +44,7 @@ jobs:
- run: |
git clean -d -x -f
- rm -fr tests/run-test-suite
+ rm -fr libyaml-test
git worktree prune
- name: Compiler version
diff --git a/.gitignore b/.gitignore
index 8257f57..1808b6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ config.h*
/configure
stamp-h1
!config/config.h.in
+/libyaml-test/
/tests/run-dumper
/tests/run-emitter
/tests/run-emitter-test-suite
@@ -39,7 +40,6 @@ stamp-h1
/tests/example-deconstructor-alt
/tests/example-reformatter
/tests/example-reformatter-alt
-/tests/run-test-suite
/tests/test-reader
/tests/test-version
/dist/
diff --git a/.libyaml-test b/.libyaml-test
new file mode 100644
index 0000000..5149d25
--- /dev/null
+++ b/.libyaml-test
@@ -0,0 +1,3 @@
+# This is the `libyaml-test` repository URL and the branch to use:
+
+https://github.com/yaml/libyaml-test 2020-06-22
diff --git a/.makefile b/.makefile
index 7d6e572..594b79c 100644
--- a/.makefile
+++ b/.makefile
@@ -30,8 +30,7 @@ MAKE_TARGETS := \
test-all \
test-suite \
-# SOURCE_FILES := $(shell find . | grep '\.c$$')
-SOURCE_FILES := $(shell find tests/run-test-suite | grep '\.c$$')
+SOURCE_FILES := $(shell find . | grep '\.c$$')
ifneq ($(shell which gindent),)
INDENT := gindent
else
@@ -61,5 +60,4 @@ indent:
distclean purge:
git clean -dxf -e GNUmakefile
- rm -fr tests/run-test-suite
- git worktree prune
+ rm -fr libyaml-test
diff --git a/Makefile.am b/Makefile.am
index 45d9c27..ecba6d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,9 +5,11 @@ SUBDIRS = include src . tests
EXTRA_DIST = Changes ReadMe.md License CMakeLists.txt doc/doxygen.cfg
-LIBYAML_TEST_SUITE_RUN_REPO_DEFAULT := https://github.com/yaml/libyaml
-LIBYAML_TEST_SUITE_RUN_REPO ?= $(LIBYAML_TEST_SUITE_RUN_REPO_DEFAULT)
-LIBYAML_TEST_SUITE_RUN_BRANCH ?= run-test-suite
+export LIBYAML_ROOT := $(shell pwd)
+
+LIBYAML_TEST := $(shell grep -E '^(http|git)' .libyaml-test | tail -n1)
+LIBYAML_TEST_REPO ?= $(word 1, $(LIBYAML_TEST))
+LIBYAML_TEST_COMMIT ?= $(word 2, $(LIBYAML_TEST))
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = yaml-0.1.pc
@@ -17,31 +19,22 @@ maintainer-clean-local:
-find ${builddir} -name Makefile.in -exec rm -f '{}' ';'
distclean-local:
- rm -fr tests/run-test-suite
+ rm -fr libyaml-test
-git worktree prune
-.PHONY: bootstrap
+.PHONY: bootstrap libyaml-test
bootstrap: maintainer-clean
./bootstrap
./configure
make
+test-all: test test-suite
+
test: all
make -C tests check-TESTS
-test-suite: tests/run-test-suite all
- make -C $< test
-
-test-all: test test-suite
-
-tests/run-test-suite:
-ifeq ($(LIBYAML_TEST_SUITE_RUN_REPO),$(LIBYAML_TEST_SUITE_RUN_REPO_DEFAULT))
- -git branch --track $(LIBYAML_TEST_SUITE_RUN_BRANCH) origin/$(LIBYAML_TEST_SUITE_RUN_BRANCH)
- -git worktree prune
- git worktree add $@ $(LIBYAML_TEST_SUITE_RUN_BRANCH)
- else
- git clone --branch $(LIBYAML_TEST_SUITE_RUN_BRANCH) $(LIBYAML_TEST_SUITE_RUN_REPO) $@
- endif
+test-suite: libyaml-test all
+ make -C $< $@
docker-build:
make -C pkg/docker build
@@ -49,3 +42,6 @@ docker-build:
docker-dist:
make -C pkg/docker libyaml-dist
+libyaml-test:
+ -git clone $(LIBYAML_TEST_REPO) $@
+ ( cd $@ && git reset --hard $(LIBYAML_TEST_COMMIT) )
diff --git a/ReadMe.md b/ReadMe.md
index 2dfcc44..4bc3b1a 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -4,7 +4,7 @@ To build and install the library, run:
$ ./configure
$ make
- # make install
+ $ make install
Required packages:
@@ -12,29 +12,29 @@ Required packages:
- libtool
- make
-If you checked the source code from the Git repository, run
+If you cloned the source code from the Git repository, run:
$ ./bootstrap
$ ./configure
$ make
- # make install
+ $ make install
Required packages:
- autoconf
+- gcc
- libtool
- make
-For more information, check the [LibYAML
-homepage](https://github.com/yaml/libyaml).
+This libyaml source code repository is hosted at
+https://github.com/yaml/libyaml.
-Discuss LibYAML with the maintainers in IRC #libyaml irc.freenode.net.
+To contribute changes, see https://github.com/yaml/libyaml/wiki/Contributing.
-You may also use the [YAML-Core mailing
-list](http://lists.sourceforge.net/lists/listinfo/yaml-core).
+Discuss LibYAML with the maintainers in IRC #libyaml irc.freenode.net.
-Submit bug reports and feature requests to the [LibYAML bug
-tracker](https://github.com/yaml/libyaml/issues/new).
+Submit bug reports and feature requests to
+https://github.com/yaml/libyaml/issues/.
This project was developed for Python Software Foundation as a part of Google
Summer of Code under the mentorship of Clark Evans.
@@ -43,4 +43,4 @@ The LibYAML module was written by Kirill Simonov <xi@resolvent.net>.
It is currently maintained by the YAML community.
LibYAML is released under the MIT license.
-See the file LICENSE for more details.
+See the file License for more details.
diff --git a/tests/run-all-tests.sh b/tests/run-all-tests.sh
index 9c92741..ea59ced 100755
--- a/tests/run-all-tests.sh
+++ b/tests/run-all-tests.sh
@@ -22,8 +22,7 @@ main() {
clean() {
git clean -d -x -f
- rm -fr tests/run-test-suite
- git worktree prune
+ rm -fr libyaml-test
}
main "$@"