Merge authors:
  Steve Langasek (vorlon)
Related merge proposals:
  
https://code.launchpad.net/~vorlon/upstart/shell-error-message-match/+merge/185414
  proposed by: Steve Langasek (vorlon)
------------------------------------------------------------
revno: 1533 [merge]
committer: Dmitrijs Ledkovs <[email protected]>
branch nick: upstart
timestamp: Fri 2013-09-13 09:35:44 +0100
message:
  adjust test case to not key on the text of error messages which will vary
modified:
  ChangeLog
  init/tests/test_job_process.c


--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk

Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to 
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog'
--- ChangeLog	2013-09-13 04:43:00 +0000
+++ ChangeLog	2013-09-13 04:44:55 +0000
@@ -5,6 +5,10 @@
 	* extra/Makefile.am:
 	  - don't pass cflags from unrelated libraries when building, only
 	    pass them to those bridges which use the relevant libraries.
+	* init/tests/test_job_process.c: adjust test case to not key on the
+	  text of error messages which will vary depending on whether
+	  /bin/sh is dash or bash; and use TEST_STR_MATCH so that in the
+	  event of future failures, we know why it's failing.
 
 2013-09-05  James Hunt  <[email protected]>
 

=== modified file 'init/tests/test_job_process.c'
--- init/tests/test_job_process.c	2013-07-01 23:15:19 +0000
+++ init/tests/test_job_process.c	2013-09-13 04:44:55 +0000
@@ -3068,7 +3068,7 @@
 	TEST_NE_P (output, NULL);
 
 	TEST_TRUE (fgets (buffer, sizeof(buffer), output));
-	TEST_EQ (fnmatch ("*sh*/this/command/does/not/exist*not found*", buffer, 0), 0);
+	TEST_STR_MATCH (buffer, "*sh:*/this/command/does/not/exist:*");
 
 	TEST_FILE_END (output);
 	fclose (output);
@@ -3555,7 +3555,7 @@
 	TEST_NE_P (output, NULL);
 
 	TEST_TRUE (fgets (buffer, sizeof(buffer), output));
-	TEST_EQ (fnmatch ("/proc/self/fd/9*/this/command/does/not/exist*not found*", buffer, 0), 0);
+	TEST_STR_MATCH (buffer, "/proc/self/fd/9*/this/command/does/not/exist:*");
 
 	TEST_FILE_END (output);
 	fclose (output);

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to