瀏覽代碼

Fix the unit test environment check

bel 10 年之前
父節點
當前提交
358c7dca50
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      test/public_server.c

+ 3 - 5
test/public_server.c

@@ -80,7 +80,7 @@ START_TEST(test_the_test_environment)
 	if (f) {
 		fclose(f);
 	} else {
-		ck_abort_msg("%s not found", buf);
+		fprintf(stderr, "%s not found", buf);
 	}
 
 /* Check the test dir */
@@ -95,10 +95,8 @@ START_TEST(test_the_test_environment)
 	memset(&st, 0, sizeof(st));
 	ret = stat(buf, &st);
 
-	if (!ret) {
-		fclose(f);
-	} else {
-		ck_abort_msg("%s not found", buf);
+	if (ret) {
+		fprintf(stderr, "%s not found", buf);
 	}
 }
 END_TEST