Skip to content

pt: Sparrowhawk ITN tests cannot run (export_grammars.sh --MODE=test fails) #514

Open

Description

@VitorAMJorge

Description
The pt Sparrowhawk test scripts don't run:

  1. test_sparrowhawk_inverse_text_normalization.sh defaults PROJECT_DIR to /workspace/tests/en, but its paths assume the tests root ($PROJECT_DIR/pt/..., $PROJECT_DIR/../shunit2). It fails before running any test.
  2. Both pt scripts pass their arguments on to shUnit2, which treats them as a test file and test names. Calling a script with <grammars_dir> <tests_root> breaks it.

CI doesn't catch this because only the English Sparrowhawk tests run in Jenkins.

Steps/Code to reproduce bug

From tools/text_processing_deployment/ on main:

bash export_grammars.sh --MODE=test --LANGUAGE=pt --GRAMMARS=itn_grammars
→ line 86: /workspace/tests/en/../shunit2/shunit2: No such file or directory

Expected behavior

Both scripts run all their tests, with or without arguments.

Environment overview

  • Environment location: Docker
  • Method of NeMo install: from source (main, ddadfb2)
  • If method of install is [Docker], provide docker pull & docker run commands used: image built and run by export_grammars.sh (docker/build.sh, docker/launch.sh)

Environment details

  • OS version: Debian 12 (Sparrowhawk image from the repo's Dockerfile, continuumio/miniconda3:25.3.1-1); host: Windows 11 + Docker Desktop
  • PyTorch version: not needed
  • Python version: 3.11 (grammar export, pynini 2.1.6.post1)

Additional context

Proposed fix: default PROJECT_DIR to /workspace/tests in the ITN script (the TN script already does), and add shift $# before sourcing shUnit2 in both, as the English scripts do. Happy to open a PR.

Activity

  1. added
    bug
    on Oct 23, 2026
  2. github-actions commented on Nov 23, 2026

    @github-actions

    This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions