mavak / trucov

True coverage tool for C / C++
1 stars 1 forks source link

Utility: create_file_name creates hidden files #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. trucov report
2. Notice all *trucov files are hidden

Fix:

The method ptr_utility->create_file_name returns filenames with "." in the
front. This is a hidden file. The output create_file_name should not output
filenames with a "." in the front.

Original issue reported on code.google.com by millerlyte87@gmail.com on 21 Sep 2009 at 4:40

GoogleCodeExporter commented 9 years ago

Original comment by yekyaw.wsu@gmail.com on 26 Sep 2009 at 9:16

GoogleCodeExporter commented 9 years ago
Still not fixed.

1) trucov report -c sample_projects/fast_protocol/
2) ls   // you see no trucov files
3) ls -a // you see hidden trucov files

The root cause -> get_rel_path returns strings in this format now:
./src/dog.cpp
./include/horse.h

Should be in format
src/dog.cpp
include/horse.h

If you fix get_rel_path, it will fix this problem. 
So, in get_rel_path, before you return the string, if it starts with "./", then
remove the "./" and return the resulting string.

Original comment by millerlyte87@gmail.com on 26 Sep 2009 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by yekyaw.wsu@gmail.com on 27 Sep 2009 at 7:20

GoogleCodeExporter commented 9 years ago
No longer makes hidden files, but now it's cutting the first character off of 
the names:

1) trucov report -c sample_test/fast_protocol/
2) ls

See output:   
nclude##operate_operate_rx.h.trucov
nclude##ping_rx.h.trucov
nclude##present_state_rx.h.trucov
nclude##read_rx.h.trucov
nclude##relay_definition_fmt.h.trucov
nclude##relay_definition_rx.h.trucov
nclude##request_handler.h.trucov
nclude##unsolicited_acknowledge_rx.h.trucov
nclude##unsolicited_on_off_rx.h.trucov
nclude##unsolicited_on_off_tx.h.trucov
nclude##unsolicited_write_rx.h.trucov
nclude##unsolicited_write_tx.h.trucov

It's cutting off the first character
should be 
include##unsol...

Before you change the status to needs verification, you should yourself, check 
to
make sure it is working. It is the coders responsibility to check their code 
works
correctly. The verifier, just catches mistakes if any are made.

Original comment by millerlyte87@gmail.com on 28 Sep 2009 at 8:41

GoogleCodeExporter commented 9 years ago
The cutting off is a bug in my current build (for some reason). I had to change 
some
stuff to get the tests working, but it appears to be working in the main build.

Verified by Matt.

Original comment by millerlyte87@gmail.com on 30 Sep 2009 at 5:04