mirror of
https://github.com/curl/curl.git
synced 2026-07-26 00:47:20 +03:00
tests: introduce preprocessed test cases
The runtests script now always performs variable replacement on the entire test source file before the test gets executed, and saves the updated version in a temporary file (log/test[num]) so that all test case readers/servers can use that version (if present) and thus enjoy the powers of test case variable substitution. This is necessary to allow complete port number freedom. Test 309 is updated to work with a non-fixed port number thanks to this.
This commit is contained in:
parent
5e2f4a33fe
commit
d009bc2e56
10 changed files with 171 additions and 177 deletions
|
|
@ -28,6 +28,7 @@ void logmsg(const char *msg, ...);
|
|||
long timediff(struct timeval newer, struct timeval older);
|
||||
|
||||
#define TEST_DATA_PATH "%s/data/test%ld"
|
||||
#define ALTTEST_DATA_PATH "%s/log/test%ld"
|
||||
|
||||
#define SERVERLOGS_LOCK "log/serverlogs.lock"
|
||||
|
||||
|
|
@ -53,8 +54,9 @@ void win32_init(void);
|
|||
void win32_cleanup(void);
|
||||
#endif /* USE_WINSOCK */
|
||||
|
||||
/* returns the path name to the test case file */
|
||||
char *test2file(long testno);
|
||||
/* fopens the test case file */
|
||||
FILE *test2fopen(long testno);
|
||||
|
||||
int wait_ms(int timeout_ms);
|
||||
int write_pidfile(const char *filename);
|
||||
int write_portfile(const char *filename, int port);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue