diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8ec4973..9f5388f0 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 8257f570..1808b6cd 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 00000000..5149d254 --- /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 7d6e5723..594b79c7 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 45d9c270..322defb4 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 '^https' .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 2dfcc447..4bc3b1a2 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 . 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 9c92741e..ea59ced0 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 "$@"