Skip to content

UTBot cannot execute tests if a directory name is the same as a filename without extensions #626

@IDKWNTCMF

Description

@IDKWNTCMF

Description
If some filename f without extensions is the same as some directory name d, then UTBot will create executable for file f with the same path as a directory for recompiled files from d, because of this generated tests cannot be executed.

To Reproduce
Steps to reproduce the behavior:

  1. Generate tests for libyang projects (file src/plugins_exts.c and directory src/plugins_exts)
  2. Try to run generated tests

Expected behavior
Tests are supposed to be executed.

Actual behavior
Error while trying to create directory.

Visual proofs (screenshots, logs)

mkdir: cannot create directory '/home/utbot/libyang/utbot_tests/makefiles/src/plugins_exts/../../../../build/utbot_files/utbot_build/recompiled/src/plugins_exts': File exists
/home/utbot/libyang/utbot_tests/makefiles/src/plugins_exts/../../../../utbot_tests/makefiles/src/plugins_exts/__metadata_shared.mk:376: recipe for target '/home/utbot/libyang/utbot_tests/makefiles/src/plugins_exts/../../../../build/utbot_files/utbot_build/recompiled/src/plugins_exts/metadata_test' failed
make[1]: *** [/home/utbot/libyang/utbot_tests/makefiles/src/plugins_exts/../../../../build/utbot_files/utbot_build/recompiled/src/plugins_exts/metadata_test] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions