
Le jeu 15/07/2004 à 19:02, Robert Ramey a écrit :
Guillaume Melquiond wrote:
So it may be a good idea to completely remove the function "tmpnam" from the Serialization library and use a saner replacement instead. This way, the library tests would compile without any complaint from the linker on Linux.
I need this functionality to run the tests. What is the best way to go about it?
I don't know what the best way is. However, some other libraries also need to write to files during their tests. For example, the filesystem library doesn't even bother and it directly creates some directories [1]. When running regression tests, they end in boost/status. You could work the same way: simply create a file with a given name rather than trying to create a temporary file. If you think it is a bit ugly, I have the same opinion. A better way would probably for bjam to provide a clean sandbox where test programs could play rather than letting them work in boost/status. But I don't know how easy it would be. Regards, Guillaume [1] Speaking of which, filesystem/test/convenience_test.cpp could at least delete its test directory at the end of its execution.