Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

VUnit testcases fail if the last character in a testcase name is a whitespace (VHDL)

Aperta
#1,008 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
testing

Direzione di ricerca

Start with the attached MinimalExample.zip, especially its run.py script and VHDL testbench, and reproduce the failure for the testcase named "Test Fail ". Compare it with "Test Pass" to locate where the trailing whitespace changes the result. The issue is resolved when both testcase names run as expected; the payload does not identify a VUnit source file or test to inspect.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug

Recently I noticed that a vunit testcase in a VHDL testbench will always fail if the name of it ends with a Whitespace. I attached a minimal example including a simple run.py script and a minimal testbench with two testcases. I tested this on two separate windows machines and got the same results on both pcs. Is this a bug in vunit or is something else wrong here?

MinimalExample.zip

from vunit import VUnit

# Create VUnit instance by parsing command line arguments
vu = VUnit.from_argv()

# Create library 'lib'
lib = vu.add_library("lib")

# Add all files ending in .vhd in current working directory to library
lib.add_source_files("*.vhd")

# Run vunit function
vu.main()
library vunit_lib;
context vunit_lib.vunit_context;

entity tb_Test is
  generic (runner_cfg : string);
end entity;

architecture tb of tb_Test is
begin
  main : process
  begin
    test_runner_setup(runner, runner_cfg);
    
    while test_suite loop

        if run("Test Fail ") then
            
            -- This Testcase fails because the name of the 
            -- Testcase ends in a whitespace
  
        elsif run("Test Pass") then
          
            -- This Testcase is successfull
            -- Note: There is no whitespace at the end
            
        end if;
      end loop;

    test_runner_cleanup(runner); -- Simulation ends here
  end process;
end architecture;
Lingua principale
VHDL
Stelle
850
Fork
305
Merge medio
2g 10h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di VUnit/vunit

Tutte le issue di VUnit/vunit

Issue simili

Altre issue su Testing & QA

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.