From e318c3ee08e164861d3e987669bb575b42094066 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Fri, 8 Mar 2024 19:37:35 +0200 Subject: [PATCH] ci: update workflows --- .gitattributes | 2 + .github/workflows/ci.yml | 81 ++++--- .github/workflows/fuzz.yml | 6 +- .github/workflows/lint.yml | 19 -- .github/workflows/pack.yml | 94 -------- .github/workflows/publish.yml | 118 ++-------- .gitignore | 3 +- script/known-failures.txt | 368 ++++++++++++++++++++++++++++++-- script/parse-examples | 84 +++----- script/update-known-failures.sh | 10 - 10 files changed, 454 insertions(+), 331 deletions(-) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/pack.yml delete mode 100755 script/update-known-failures.sh diff --git a/.gitattributes b/.gitattributes index eec96dce..6d39a762 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,8 @@ test/corpus/crlf.txt eol=crlf +script/known-failures.txt -diff + examples/* linguist-vendored src/*.json linguist-generated diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5b3c48f..97f362c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,68 @@ name: CI + on: push: - branches: - - master + branches: [master] + paths: + - grammar.js + - src/** + - test/** + - bindings/** + - binding.gyp pull_request: - branches: - - master + paths: + - grammar.js + - src/** + - test/** + - bindings/** + - binding.gyp + +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: true + jobs: test: - runs-on: ${{ matrix.os }} + name: Test parser + runs-on: ${{matrix.os}} strategy: - fail-fast: true + fail-fast: false matrix: - os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest, windows-latest, macos-14] steps: - - uses: actions/checkout@v4 + - name: Set up the repo + uses: tree-sitter/parser-setup-action@v1.1 with: - submodules: true - fetch-depth: 0 - - uses: actions/setup-node@v4 + node-version: ${{vars.NODE_VERSION}} + - name: Set up examples + shell: sh + run: |- + git clone https://github.com/Bash-it/bash-it examples/bash-it -q --single-branch --depth=1 + git clone https://git.savannah.gnu.org/git/bash.git examples/bash -q --single-branch --depth=1 + git clone https://anongit.gentoo.org/git/repo/gentoo.git examples/gentoo -q --single-branch --depth=1 + if [[ '${{runner.os}}' != Windows ]]; then + git clone https://github.com/oilshell/wild-corpus examples/wild-corpus -q --single-branch --depth=1 + fi + - name: Read known failures + uses: actions/github-script@v7 + id: known-failures with: - node-version: 18 - - run: npm install - - run: npm test - test_windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 - - uses: actions/setup-node@v4 + result-encoding: string + script: "return require('fs').readFileSync('script/known-failures.txt', 'utf8')" + - name: Run tests + uses: tree-sitter/parser-test-action@v1.2 with: - node-version: 18 - - run: npm install - - run: npm run-script test-windows + lint: ${{runner.os == 'Linux'}} + test-library: ${{runner.os == 'Linux'}} + corpus-files: | + examples/*.sh + examples/bash-it/**/*.sh + examples/bash-it/**/*.bash + examples/bash/**/*.sh + examples/bash/**/*.tests + examples/gentoo/**/*.sh + examples/gentoo/**/*.eclass + examples/wild-corpus/**/*.sh + # examples/gentoo/**/*.ebuild + !examples/gentoo/eclass/ruby-fakegem.eclass + ${{steps.known-failures.outputs.result}} diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 8d777224..e00875fa 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -15,8 +15,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: vigoux/tree-sitter-fuzz-action@v1 - with: - language: bash - external-scanner: src/scanner.c - time: 60 + - uses: tree-sitter/fuzz-action@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 103e92ae..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Lint - -on: - push: - branches: - - master - pull_request: - branches: - - "**" - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install modules - run: npm install - - name: Run ESLint - run: npm run lint diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml deleted file mode 100644 index 174793f2..00000000 --- a/.github/workflows/pack.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Pack - -on: - workflow_dispatch: - release: - types: - - released - -env: - NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -t 20.0.0 --strip -u ${{ secrets.GITHUB_TOKEN }} - ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 --strip -u ${{ secrets.GITHUB_TOKEN }} - -jobs: - test: - strategy: - matrix: - os: - - macos-latest - - ubuntu-latest - node: - - 10 - - 12 - - 14 - - 16 - - 18 - - 20 - fail-fast: false - name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - run: npm install - - run: npm test - - test-windows: - strategy: - matrix: - os: - - windows-2019 - node: - - 10 - - 12 - - 14 - - 16 - - 18 - - 20 - fail-fast: false - name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - run: npm install - - run: npm run test-windows - - prebuild: - strategy: - matrix: - os: - - windows-2019 - - macos-latest - - ubuntu-latest - fail-fast: false - name: Prebuild for ${{ matrix.os }} - runs-on: ${{ matrix.os }} - needs: [test, test-windows] - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm install - - if: runner.os == 'macOS' - run: ${{ env.NODE_PREBUILD_CMD }} --arch arm64 - - if: runner.os == 'macOS' - run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64 - - run: ${{ env.NODE_PREBUILD_CMD }} - - run: ${{ env.ELECTRON_PREBUILD_CMD }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 870eb84b..cb7e16b8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,103 +1,23 @@ -name: Release +name: Publish packages on: - workflow_run: - workflows: ["CI"] - branches: - - master - types: - - completed + push: + tags: ["*"] -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get previous commit SHA - id: get_previous_commit - run: | - LATEST_TAG=$(git describe --tags --abbrev=0) - if [[ -z "$LATEST_TAG" ]]; then - echo "No tag found. Failing..." - exit 1 - fi - echo "latest_tag=${LATEST_TAG#v}" >> "$GITHUB_ENV" # Remove 'v' prefix from the tag - - - name: Check if version changed and is greater than the previous - id: version_check - run: | - # Compare the current version with the version from the previous commit - PREVIOUS_NPM_VERSION=${{ env.latest_tag }} - CURRENT_NPM_VERSION=$(jq -r '.version' package.json) - CURRENT_CARGO_VERSION=$(awk -F '"' '/^version/ {print $2}' Cargo.toml) - if [[ "$CURRENT_NPM_VERSION" != "$CURRENT_CARGO_VERSION" ]]; then # Cargo.toml and package.json versions must match - echo "Mismatch: NPM version ($CURRENT_NPM_VERSION) and Cargo.toml version ($CURRENT_CARGO_VERSION)" - echo "version_changed=false" >> "$GITHUB_ENV" - else - if [[ "$PREVIOUS_NPM_VERSION" == "$CURRENT_NPM_VERSION" ]]; then - echo "version_changed=" >> "$GITHUB_ENV" - else - IFS='.' read -ra PREVIOUS_VERSION_PARTS <<< "$PREVIOUS_NPM_VERSION" - IFS='.' read -ra CURRENT_VERSION_PARTS <<< "$CURRENT_NPM_VERSION" - VERSION_CHANGED=false - for i in "${!PREVIOUS_VERSION_PARTS[@]}"; do - if [[ ${CURRENT_VERSION_PARTS[i]} -gt ${PREVIOUS_VERSION_PARTS[i]} ]]; then - VERSION_CHANGED=true - break - elif [[ ${CURRENT_VERSION_PARTS[i]} -lt ${PREVIOUS_VERSION_PARTS[i]} ]]; then - break - fi - done - - echo "version_changed=$VERSION_CHANGED" >> "$GITHUB_ENV" - echo "current_version=${CURRENT_NPM_VERSION}" >> "$GITHUB_ENV" - fi - fi - - - name: Display result - run: | - echo "Version bump detected: ${{ env.version_changed }}" +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: true - - name: Fail if version is lower - if: env.version_changed == 'false' - run: exit 1 - - - name: Setup Node - if: env.version_changed == 'true' - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: "https://registry.npmjs.org" - - name: Publish to NPM - if: env.version_changed == 'true' - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - run: npm publish - - - name: Setup Rust - if: env.version_changed == 'true' - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: Publish to Crates.io - if: env.version_changed == 'true' - uses: katyo/publish-crates@v2 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - - - name: Tag versions - if: env.version_changed == 'true' - run: | - git checkout master - git config user.name github-actions[bot] - git config user.email github-actions[bot]@users.noreply.github.com - git tag -d "v${{ env.current_version }}" || true - git push origin --delete "v${{ env.current_version }}" || true - git tag -a "v${{ env.current_version }}" -m "Version ${{ env.current_version }}" - git push origin "v${{ env.current_version }}" +jobs: + npm: + uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main + secrets: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + crates: + uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main + secrets: + CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}} + pypi: + uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main + secrets: + PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}} diff --git a/.gitignore b/.gitignore index 8bd047d8..f5526ed1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,8 +23,9 @@ dist/ *.dll *.pc -# Example dirs +# Examples /examples/*/ +script/example-files.txt # Grammar volatiles *.wasm diff --git a/script/known-failures.txt b/script/known-failures.txt index 5af880c3..ee0f8d68 100644 --- a/script/known-failures.txt +++ b/script/known-failures.txt @@ -1,23 +1,345 @@ -examples/bash/tests/arith.tests -examples/bash/tests/array.tests -examples/bash/tests/assoc.tests -examples/bash/tests/case.tests -examples/bash/tests/comsub-posix.tests -examples/bash/tests/comsub.tests -examples/bash/tests/cond.tests -examples/bash/tests/errors.tests -examples/bash/tests/exp.tests -examples/bash/tests/extglob.tests -examples/bash/tests/glob.tests -examples/bash/tests/heredoc.tests -examples/bash/tests/histexp.tests -examples/bash/tests/more-exp.tests -examples/bash/tests/new-exp.tests -examples/bash/tests/posixexp.tests -examples/bash/tests/posixexp2.tests -examples/bash/tests/posixpat.tests -examples/bash/tests/printf.tests -examples/bash/tests/quote.tests -examples/bash/tests/quotearray.tests -examples/bash/tests/redir.tests -examples/bash/tests/test.tests +!examples/bash-it/completion/available/aliases.completion.bash +!examples/bash-it/completion/available/bundler.completion.bash +!examples/bash-it/completion/available/sqlmap.completion.bash +!examples/bash-it/plugins/available/aws.plugin.bash +!examples/bash-it/plugins/available/colors.plugin.bash +!examples/bash-it/themes/hawaii50/hawaii50.theme.bash +!examples/bash/examples/functions/notify.bash +!examples/bash/examples/shellmath/shellmath.sh +!examples/bash/tests/arith.tests +!examples/bash/tests/array.tests +!examples/bash/tests/assoc.tests +!examples/bash/tests/case.tests +!examples/bash/tests/comsub-posix.tests +!examples/bash/tests/cond.tests +!examples/bash/tests/errors.tests +!examples/bash/tests/extglob.tests +!examples/bash/tests/glob.tests +!examples/bash/tests/heredoc.tests +!examples/bash/tests/histexp.tests +!examples/bash/tests/misc/dev-tcp.tests +!examples/bash/tests/more-exp.tests +!examples/bash/tests/new-exp.tests +!examples/bash/tests/posixexp.tests +!examples/bash/tests/posixexp2.tests +!examples/bash/tests/printf.tests +!examples/bash/tests/quote.tests +!examples/bash/tests/quotearray.tests +!examples/bash/tests/redir.tests +!examples/bash/tests/test.tests +!examples/gentoo/app-misc/editor-wrapper/files/editor-wrapper-4.sh +!examples/gentoo/eclass/tests/toolchain-funcs.sh +!examples/gentoo/mail-client/thunderbird-bin/files/thunderbird-bin-r1.sh +!examples/gentoo/mail-client/thunderbird/files/thunderbird-r1.sh +!examples/gentoo/sys-apps/less/files/lesspipe-r1.sh +!examples/gentoo/sys-apps/less/files/lesspipe-r3.sh +!examples/gentoo/www-client/firefox-bin/files/firefox-bin-r1.sh +!examples/gentoo/www-client/firefox/files/firefox-r1.sh +!examples/wild-corpus/cloud/chef-bcpc/legacy_scripts/make_databag.sh +!examples/wild-corpus/cloud/docker/hack/make.sh +!examples/wild-corpus/cloud/kubernetes/build/common.sh +!examples/wild-corpus/cloud/kubernetes/cluster/gce/config-default.sh +!examples/wild-corpus/cloud/kubernetes/cluster/gce/config-test.sh +!examples/wild-corpus/cloud/kubernetes/hack/benchmark-go.sh +!examples/wild-corpus/cloud/kubernetes/hack/generate-bindata.sh +!examples/wild-corpus/cloud/kubernetes/hack/lib/golang.sh +!examples/wild-corpus/cloud/kubernetes/hack/lib/test.sh +!examples/wild-corpus/cloud/kubernetes/hack/make-rules/test-integration.sh +!examples/wild-corpus/cloud/kubernetes/hack/make-rules/test.sh +!examples/wild-corpus/cloud/kubernetes/hack/make-rules/verify.sh +!examples/wild-corpus/cloud/kubernetes/hack/update-api-reference-docs.sh +!examples/wild-corpus/cloud/kubernetes/hack/update-codegen.sh +!examples/wild-corpus/cloud/kubernetes/hack/update-federation-api-reference-docs.sh +!examples/wild-corpus/cloud/kubernetes/hack/update-federation-swagger-spec.sh +!examples/wild-corpus/cloud/kubernetes/hack/update-swagger-spec.sh +!examples/wild-corpus/cloud/kubernetes/test/e2e_node/gubernator.sh +!examples/wild-corpus/cloud/kubernetes/vendor/github.com/ugorji/go/codec/prebuild.sh +!examples/wild-corpus/cloud/sandstorm/install.sh +!examples/wild-corpus/cloud/sandstorm/make-bundle.sh +!examples/wild-corpus/cloud/sandstorm/shell/run-dev.sh +!examples/wild-corpus/distro/DietPi/PREP_SYSTEM_FOR_DIETPI.sh +!examples/wild-corpus/distro/portage/bin/misc-functions.sh +!examples/wild-corpus/distro/portage/bin/phase-helpers.sh +!examples/wild-corpus/distro/woof-CE/initrd-progs/build.sh +!examples/wild-corpus/distro/woof-CE/woof-code/rootfs-packages/network_wizard/usr/sbin/wag-profiles.sh +!examples/wild-corpus/distro/woof-CE/woof-code/rootfs-skeleton/usr/local/petget/configure.sh +!examples/wild-corpus/distro/woof-CE/woof-code/rootfs-skeleton/usr/local/petget/installpkg.sh +!examples/wild-corpus/distro/woof-CE/woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh +!examples/wild-corpus/esoteric/CmdlineGL/share/examples/FlightSim.sh +!examples/wild-corpus/esoteric/CmdlineGL/share/examples/Robot.sh +!examples/wild-corpus/esoteric/lishp/callable.lambda.sh +!examples/wild-corpus/esoteric/lishp/parser.sh +!examples/wild-corpus/esoteric/make-a-lisp-bash/core.sh +!examples/wild-corpus/esoteric/shasm/shasm.sh +!examples/wild-corpus/exp/shootout/timing.sh +!examples/wild-corpus/freebsd-11.1/contrib/binutils/ld/emulparams/elf64bmip.sh +!examples/wild-corpus/freebsd-11.1/contrib/binutils/ld/genscripts.sh +!examples/wild-corpus/freebsd-11.1/contrib/gcc/scan-types.sh +!examples/wild-corpus/freebsd-11.1/contrib/groff/src/preproc/eqn/neqn.sh +!examples/wild-corpus/freebsd-11.1/contrib/groff/src/roff/nroff/nroff.sh +!examples/wild-corpus/freebsd-11.1/contrib/netbsd-tests/bin/sh/t_arith.sh +!examples/wild-corpus/freebsd-11.1/contrib/netbsd-tests/bin/sh/t_here.sh +!examples/wild-corpus/freebsd-11.1/contrib/ntp/scripts/stats/summary.sh +!examples/wild-corpus/freebsd-11.1/contrib/ntp/scripts/update-leap/update-leap.sh +!examples/wild-corpus/freebsd-11.1/crypto/openssl/util/bat.sh +!examples/wild-corpus/freebsd-11.1/gnu/usr.bin/binutils/ld/genscripts.sh +!examples/wild-corpus/freebsd-11.1/share/examples/drivers/make_device_driver.sh +!examples/wild-corpus/freebsd-11.1/share/examples/drivers/make_pseudo_driver.sh +!examples/wild-corpus/freebsd-11.1/sys/dev/bhnd/tools/bus_macro.sh +!examples/wild-corpus/freebsd-11.1/sys/tools/bus_macro.sh +!examples/wild-corpus/freebsd-11.1/tools/tools/mctest/mctest_run.sh +!examples/wild-corpus/freebsd-11.1/tools/tools/nanobsd/fill_pkg.sh +!examples/wild-corpus/freebsd-11.1/tools/tools/shlib-compat/test/regress.sh +!examples/wild-corpus/freebsd-11.1/tools/tools/sysbuild/sysbuild.sh +!examples/wild-corpus/freebsd-11.1/tools/tools/sysdoc/sysdoc.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/apply/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/calendar/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/comm/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/file2c/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/join/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/jot/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/m4/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/man/man.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/ncal/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/printf/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/sed/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/shar/shar.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/tr/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/uudecode/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/uuencode/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.bin/xargs/tests/regress.sh +!examples/wild-corpus/freebsd-11.1/usr.sbin/adduser/adduser.sh +!examples/wild-corpus/freebsd-11.1/usr.sbin/freebsd-update/freebsd-update.sh +!examples/wild-corpus/freebsd-11.1/usr.sbin/manctl/manctl.sh +!examples/wild-corpus/freebsd-11.1/usr.sbin/portsnap/portsnap/portsnap.sh +!examples/wild-corpus/git/contrib/examples/git-ls-remote.sh +!examples/wild-corpus/git/contrib/examples/git-merge.sh +!examples/wild-corpus/git/contrib/examples/git-pull.sh +!examples/wild-corpus/git/git-filter-branch.sh +!examples/wild-corpus/git/git-merge-octopus.sh +!examples/wild-corpus/git/git-merge-resolve.sh +!examples/wild-corpus/git/git-rebase--interactive.sh +!examples/wild-corpus/git/git-submodule.sh +!examples/wild-corpus/git/t/lib-pack.sh +!examples/wild-corpus/git/t/t9500-gitweb-standalone-no-errors.sh +!examples/wild-corpus/gnu/binutils-2.26/ld/emulparams/elf64bmip.sh +!examples/wild-corpus/gnu/binutils-2.26/ld/genscripts.sh +!examples/wild-corpus/gnu/coreutils-8.22/gnulib-tests/init.sh +!examples/wild-corpus/gnu/coreutils-8.22/tests/init.sh +!examples/wild-corpus/gnu/coreutils-8.22/tests/ln/hard-to-sym.sh +!examples/wild-corpus/gnu/glibc-2.23/posix/globtest.sh +!examples/wild-corpus/gnu/glibc-2.23/posix/tst-getconf.sh +!examples/wild-corpus/gnu/glibc-2.23/sysdeps/unix/make-syscalls.sh +!examples/wild-corpus/gnu/grep-2.24/gnulib-tests/init.sh +!examples/wild-corpus/gnu/grep-2.24/tests/init.sh +!examples/wild-corpus/google/bazel/src/test/shell/bazel/remote_helpers.sh +!examples/wild-corpus/google/kythe/.jenkins/nightly-release.sh +!examples/wild-corpus/google/kythe/kythe/extractors/openjdk/extract.sh +!examples/wild-corpus/hg-other/eigen/bench/perf_monitoring/gemm/run.sh +!examples/wild-corpus/hg-other/pygments-main/tests/examplefiles/example.sh +!examples/wild-corpus/hg-other/pygments-main/tests/examplefiles/ltmain.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/acct/prctmp.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/acct/prtacct.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/allocate/disk_clean.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/ast/msgcc/msgcc.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/avs/dscfg/dscfgadm.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/diff3/diff3.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/initpkg/umountall.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/ipf/examples/mkfilters.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/krb5/kadmin/kclient/kclient.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/ldap/ns_ldap/idsconfig.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/svc/configd/restore_repository.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/svc/shell/ipf_include.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/tail/tests/sun_solaris_tail.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/tsol/misc/txzonemgr.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/ypcmd/multi.awk.sh +!examples/wild-corpus/illumos-gate/usr/src/cmd/ypcmd/ypinit.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libast/common/comp/conf.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/data/bash_pre_rc.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/cpvprint.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/filetree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/gnaw.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/multifollow.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/numtree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/primenumbers1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/rssread.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shcalc.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shircbot.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shlint.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shman.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shnote.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shpiano.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shtinyurl.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/shtwitter.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/simplefiletree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/svcproptree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/termclock.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/test_net_sctp.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/append.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/arith.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/arrays.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/arrays2.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/attributes.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/basic.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/bracket.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/builtins.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/comvar.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/coprocess.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/cubetype.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/enum.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/expand.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/functions.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/io.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/nameref.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/options.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/path.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/pointtype.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/quoting.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/quoting2.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/recttype.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sigchld.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/signal.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/statics.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/subshell.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/substring.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_builtin_poll.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/tilde.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/timetype.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/treemove.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/types.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/variables.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/vartree1.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/common/tests/vartree2.sh +!examples/wild-corpus/illumos-gate/usr/src/lib/libshell/misc/buildksh93.sh +!examples/wild-corpus/illumos-gate/usr/src/test/os-tests/tests/pf_key/acquire-spray.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/env/illumos.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/gk/cshrc.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/gk/gen_make.machines.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/gk/login.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/scripts/bldenv.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/scripts/nightly.sh +!examples/wild-corpus/illumos-gate/usr/src/tools/scripts/webrev.sh +!examples/wild-corpus/liballocs/tools/debug-funcs.sh +!examples/wild-corpus/linux-4.8.7/scripts/decode_stacktrace.sh +!examples/wild-corpus/linux-4.8.7/scripts/tags.sh +!examples/wild-corpus/linux-4.8.7/tools/perf/perf-completion.sh +!examples/wild-corpus/linux-4.8.7/tools/perf/perf-with-kcore.sh +!examples/wild-corpus/linux-4.8.7/tools/vm/slabinfo-gnuplot.sh +!examples/wild-corpus/minix/commands/scripts/DESCRIBE.sh +!examples/wild-corpus/minix/commands/scripts/mkdist.sh +!examples/wild-corpus/minix/lib/generate.sh +!examples/wild-corpus/oil/test/gold.sh +!examples/wild-corpus/oil/test/osh2oil.sh +!examples/wild-corpus/oil/test/oshc-deps.sh +!examples/wild-corpus/oil/test/smoke.sh +!examples/wild-corpus/sdk/tools/clang/scripts/update.sh +!examples/wild-corpus/shell/ast/src/cmd/3d/3d.sh +!examples/wild-corpus/shell/ast/src/cmd/3d/features/syscall.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/ditto.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/hurl.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/iffe.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/mktest.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/package.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/regress.sh +!examples/wild-corpus/shell/ast/src/cmd/INIT/rt.sh +!examples/wild-corpus/shell/ast/src/cmd/html/mm2bb.sh +!examples/wild-corpus/shell/ast/src/cmd/html/mm2html.sh +!examples/wild-corpus/shell/ast/src/cmd/html/mm2twiki.sh +!examples/wild-corpus/shell/ast/src/cmd/ie/ie.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/data/bash_pre_rc.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/append.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/arith.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/arrays.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/arrays2.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/attributes.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/basic.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/bracket.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/builtins.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/comvar.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/comvario.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/coprocess.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/cubetype.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/enum.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/expand.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/functions.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/heredoc.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/io.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/leaks.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/locale.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/math.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/nameref.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/namespace.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/options.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/path.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/pointtype.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/quoting.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/quoting2.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/recttype.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/sigchld.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/signal.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/statics.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/subshell.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/substring.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/tilde.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/timetype.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/treemove.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/types.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/variables.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/vartree1.sh +!examples/wild-corpus/shell/ast/src/cmd/ksh93/tests/vartree2.sh +!examples/wild-corpus/shell/ast/src/cmd/mam/mamold.sh +!examples/wild-corpus/shell/ast/src/cmd/msgcc/msgadmin.sh +!examples/wild-corpus/shell/ast/src/cmd/msgcc/msgcc.sh +!examples/wild-corpus/shell/ast/src/cmd/pax/tar.sh +!examples/wild-corpus/shell/ast/src/cmd/proto/changes.sh +!examples/wild-corpus/shell/ast/src/cmd/std/seq.sh +!examples/wild-corpus/shell/ast/src/cmd/warp/warp.sh +!examples/wild-corpus/shell/ast/src/lib/libast/comp/conf.sh +!examples/wild-corpus/shell/bashdb/command/backtrace.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/autoeval.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/autolist.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/basename.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/debug.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/debugging.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/editing.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/highlight.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/history.sh +!examples/wild-corpus/shell/bashdb/command/set_sub/showcommand.sh +!examples/wild-corpus/shell/bashdb/getopts_long.sh +!examples/wild-corpus/shell/bashdb/lib/processor.sh +!examples/wild-corpus/shell/bashdb/test/unit/test-file.sh +!examples/wild-corpus/shell/mksh/Build.sh +!examples/wild-corpus/shell/mksh/test.sh +!examples/wild-corpus/shell/modernish/install.sh +!examples/wild-corpus/shell/mwc-sh/shql.sh +!examples/wild-corpus/shell/posixcube/posixcube.sh +!examples/wild-corpus/shell/posixcube/test.sh diff --git a/script/parse-examples b/script/parse-examples index d96242ed..758cfc37 100755 --- a/script/parse-examples +++ b/script/parse-examples @@ -1,62 +1,36 @@ #!/usr/bin/env bash -set -eu - -cd "$(dirname "$0")/.." - -function clone_repo() { - owner=$1 - name=$2 - url=$3 - sha=$4 - - path=examples/$name - if [ ! -d "$path" ]; then - echo "Cloning $owner/$name" - if [ "$name" = "gentoo" ]; then - git clone --depth=1 "$url" "$path" - # fetch commits slowly, 20k at a time or until we can checkout the sha - cd "$path" - while ! git checkout "$sha"; do - git fetch --depth=20000 - done - cd - - else - git clone --filter=tree:0 "$url" "$path" - pushd "$path" >/dev/null - actual_sha=$(git rev-parse HEAD) - if [ "$actual_sha" != "$sha" ]; then - echo "Updating $owner/$name to $sha" - git fetch origin "$sha" - fi - popd >/dev/null - fi - fi - +set -euo pipefail + +files=( + examples/*.sh + examples/bash-it/**/*.sh + examples/bash-it/**/*.bash + examples/bash/**/*.sh + examples/bash/**/*.tests + examples/gentoo/**/*.sh + examples/gentoo/**/*.eclass + examples/gentoo/**/*.ebuild + examples/wild-corpus/**/*.sh +) + +clone() { + if [[ -d examples/$1 ]]; then + git -C "examples/$1" fetch origin "$3:$3" -f -u --depth=1 + else + git clone "$2" "examples/$1" -b "$3" --single-branch --depth=1 + fi } -clone_repo Bash-it bash-it https://github.com/Bash-it/bash-it d985e4c96b1eb4e7374b3ab53eea3513fc9f50ce -clone_repo bash bash https://git.savannah.gnu.org/git/bash.git f3b6bd19457e260b65d11f2712ec3da56cef463f -clone_repo oilshell wild-corpus https://github.com/oilshell/wild-corpus a6fe3886095ae03afd528aefe296a169738984bc -clone_repo gentoo gentoo https://anongit.gentoo.org/git/repo/gentoo.git 5d1f99c854c92dbb61677b776f691eb4c9841267 - -known_failures="$(cat script/known-failures.txt)" +cd "${0%/script/parse-examples}" -# shellcheck disable=2046 -tree-sitter parse -q \ - examples/bash-it/**/*.bash \ - examples/bash-it/**/*.sh \ - examples/bash/tests/*.tests \ - examples/gentoo/**/*.ebuild \ - examples/gentoo/**/*.eclass \ - examples/*.sh \ - $(for failure in $known_failures; do echo "!${failure}"; done) +clone bash-it https://github.com/Bash-it/bash-it master +clone bash https://git.savannah.gnu.org/git/bash.git master +clone gentoo https://anongit.gentoo.org/git/repo/gentoo.git master +clone wild-corpus https://github.com/oilshell/wild-corpus main -example_count=$(find examples -name '*.bash' -o -name '*.sh' -o -name '*.tests' -o -name '*.ebuild' -o -name '*.eclass' | wc -l) -failure_count=$(wc -w <<<"$known_failures") -success_count=$((example_count - failure_count)) -success_percent=$(bc -l <<<"100*${success_count}/${example_count}") +find examples \( -name '*.sh' -or -name '*.bash' -or -name '*.tests' -or \ + -name '*.eclass' -or -name '*.ebuild' \) -and -type f -print > script/example-files.txt -printf \ - "Successfully parsed %d of %d example files (%.1f%%)\n" \ - "$success_count" "$example_count" "$success_percent" +tree-sitter parse --scope source.bash -q -s --paths scripts/example-files |& \ + tee >(awk '/ERROR|MISSING/{print "!"$1|"sort"}' > script/known-failures.txt) diff --git a/script/update-known-failures.sh b/script/update-known-failures.sh deleted file mode 100755 index a8ee50c7..00000000 --- a/script/update-known-failures.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -shopt -s globstar - -tree-sitter parse -q -t \ - examples/bash-it/**/*.bash \ - examples/bash-it/**/*.sh \ - examples/bash/tests/*.tests \ - examples/*.sh \ - | egrep 'ERROR|MISSING' \ - | tee >(cut -d' ' -f1 | sort > script/known-failures.txt)