From 9329cdf420263120f9909666966a7f3f49715885 Mon Sep 17 00:00:00 2001 From: Stoney Jackson Date: Mon, 8 Apr 2024 16:28:11 +0000 Subject: [PATCH] test: add script to run ourPLCC/languages' tests --- .gitignore | 3 +++ bin/test/languages.bash | 14 ++++++++++++++ docs/Developer.md | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100755 bin/test/languages.bash diff --git a/.gitignore b/.gitignore index e92e2846..6e2411e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# This is created by bin/test/languages.bash. But should not be committed. +languages/ + # PLCC places generated Java files in directories named Java. Ignore them. Java/ diff --git a/bin/test/languages.bash b/bin/test/languages.bash new file mode 100755 index 00000000..31d442eb --- /dev/null +++ b/bin/test/languages.bash @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -euo pipefail + +LANGUAGES_VERSION="${LANGUAGES_VERSION:-}" +cd /tmp + +rm -rf languages +git clone https://github.com/ourPLCC/languages.git +if [ -n "${LANGUAGES_VERSION}" ] ; then + git -C ./languages checkout "${LANGUAGES_VERSION}" +fi +languages/bin/test.bash +rm -rf languages diff --git a/docs/Developer.md b/docs/Developer.md index 121ba556..e2756cbb 100644 --- a/docs/Developer.md +++ b/docs/Developer.md @@ -211,6 +211,20 @@ bin/test/everything.bash bin/test/functionality.bash ``` +### Test languages + +Check if our changes work with ourPLCC/languages: + +```bash +bin/test/languages.bash +``` + +Test a specific version (git tag, branch, or commit hash) of ourPLCC/languages: + +```bash +LANGUAGES_VESRION=v1.0.1 bin/test/languages.bash +``` + ### Test other things To learn what other class of tests you can run...