Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] tests: Add P4API tests using local P4 server instance #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ add_executable(p4-fusion-test
../p4-fusion/utils/std_helpers.cc
../p4-fusion/utils/time_helpers.cc
../p4-fusion/git_api.cc
../p4-fusion/p4_api.cc
)

target_include_directories(p4-fusion-test PRIVATE
Expand Down
8 changes: 5 additions & 3 deletions tests/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
*/
#include <iostream>

#include "tests.common.h"
#include "tests.utils.h"
#include "tests.git.h"
#include "test.common.h"
#include "test.utils.h"
#include "test.git.h"
#include "test.perforce.h"

int main()
{
TEST_REPORT("Utils", TestUtils());
TEST_REPORT("GitAPI", TestGitAPI());
TEST_REPORT("P4API", TestP4API());

SUCCESS("All test cases passed");
return 0;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/tests.git.h → tests/test.git.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
#pragma once

#include "tests.common.h"
#include "test.common.h"
#include "git_api.h"

int TestGitAPI()
Expand Down
19 changes: 19 additions & 0 deletions tests/test.perforce.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2022 Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
#pragma once

#include "test.common.h"

int TestP4API()
{
TEST_START();

// ServerHelperApi

TEST_END();
return TEST_EXIT_CODE();
}
2 changes: 1 addition & 1 deletion tests/tests.utils.h → tests/test.utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
#pragma once

#include "tests.common.h"
#include "test.common.h"
#include "utils/std_helpers.h"
#include "utils/time_helpers.h"

Expand Down