This is a test harness for the Perforce Unix SDP (Server Deployment Package). It used to use Vagrant, but has now been converted to use Docker containers (see older versions of this file for Vagrant instructions).
To use this bundle you will need to download and install the following free tool:
https://docs.docker.com/engine/installation/
If you're not familiar with Docker, it is building up a huge momentum because of its sweet spot functionality which addresses fast creation of virtual environments and the ability to ship images with all dependencies between different environments.
1) Create a workspace named YourID.test_sdp_dev.sdp (replacing YourID with your account name in the Perforce Public Depot). The root directory should be the directory where this README.md file was found, such that it creates the sdp
folder below this directory and maps some test files in this directory. The View:
of the workspace should look like this sample:
View:
//guest/perforce_software/sdp/dev/... //YourID.test_sdp_dev.sdp/sdp/...
//guest/perforce_software/sdp/dev/test/* //YourID.test_sdp_dev.sdp/*
This will test on the SDP dev branch. Alternately, change dev
with main
in the sample above to test the mainline.
2) Sync the workspace
p4 -s -c YourID.test_sdp_dev sync
3) From the command prompt run run_docker_tests.sh from the root directory. The first time you run it will take a while as it builds the initial docker images!
Build your docker image (from workspace root):
1) docker build --rm=true -t=centos6-sdp -f sdp/test/docker/Dockerfile.centos6.sdp sdp/test/docker
How to run all tests:
1) docker run --rm -v $PWD/sdp:/sdp centos6-sdp /p4/docker_entry.sh
How to interactively poke around inside the container:
1) docker run --rm -v $PWD/sdp:/sdp -it centos6-sdp /bin/bash 2) Run 'su - perforce' to become user perforce (home directory is /p4) 3) /p4/test_sdp.sh
Substitute 'centos6' for 'ubuntu' for different distribution in above commands.
Welcome ======= This is a test harness for the Perforce Unix SDP (Server Deployment Package). It used to use Vagrant, but has now been converted to use Docker containers (see older versions of this file for Vagrant instructions). Requirements ------------ To use this bundle you will need to download and install the following free tool: https://docs.docker.com/engine/installation/ If you're not familiar with Docker, it is building up a huge momentum because of its sweet spot functionality which addresses fast creation of virtual environments and the ability to ship images with all dependencies between different environments. https://docs.docker.com/mac/ Usage ----- 1) Create a workspace named YourID.test_sdp_dev.sdp (replacing YourID with your account name in the Perforce Public Depot). The root directory should be the directory where this README.md file was found, such that it creates the `sdp` folder below this directory and maps some test files in this directory. The `View:` of the workspace should look like this sample: View: //guest/perforce_software/sdp/dev/... //YourID.test_sdp_dev.sdp/sdp/... //guest/perforce_software/sdp/dev/test/* //YourID.test_sdp_dev.sdp/* This will test on the SDP dev branch. Alternately, change `dev` with `main` in the sample above to test the mainline. 2) Sync the workspace p4 -s -c YourID.test_sdp_dev sync 3) From the command prompt run run_docker_tests.sh from the root directory. The first time you run it will take a while as it builds the initial docker images! Workflow for testing -------------------- Build your docker image (from workspace root): 1) docker build --rm=true -t=centos6-sdp -f sdp/test/docker/Dockerfile.centos6.sdp sdp/test/docker How to run all tests: 1) docker run --rm -v $PWD/sdp:/sdp centos6-sdp /p4/docker_entry.sh How to interactively poke around inside the container: 1) docker run --rm -v $PWD/sdp:/sdp -it centos6-sdp /bin/bash 2) Run 'su - perforce' to become user perforce (home directory is /p4) 3) /p4/test_sdp.sh Substitute 'centos6' for 'ubuntu' for different distribution in above commands.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#12 | 30840 | C. Thomas Tyler | Minor doc tweaks. | ||
#11 | 30356 | C. Thomas Tyler |
Added Rocky 9 and Ubuntu 22 to test suite. Dropped CentOS 6. Changed default OS for tests from CentOS 7 to Rocky 9. Adapted to using podman for the test suite. Reduced minimum disk space requirement for testing from 1G to 10M. To be revisited: * Disabled OOM killer defenese feature and systemd due to compatibility issues with the test environment. * Disabled systemd by moving systemctl aside Enhanced build_docker_image.sh; added '-clean' option and added support for more platforms. Updated OS-specific packages as needed for all platforms, e.g. adding 'file' and 'rsync' utils as needed in Docker definitions. Added minimum performance recommendations for test containers in config. Updated env.sh utilities. This change test on: [X] centos7 [X] rocky8 [X] rocky9 [X] ubuntu20 [X] ubuntu22 #review-30357 @robert_cowham TO DO: * This builds using the official SDP test suite run manually on Tom's laptop. Next step: Get it working on our shiny new Jenkins Rocky 9 server machine. |
||
#10 | 27078 | C. Thomas Tyler |
Adjusted samples to reference centos7 rahter than centos6, which is EOL. |
||
#9 | 25434 | C. Thomas Tyler |
Added convenience aliases and function to provide shorthands for Docker test environment workflow. |
||
#8 | 25154 | Robert Cowham | Missed README from previous change | ||
#7 | 25153 | Robert Cowham |
Change scripts to be able to be run from workspace root sdp/test/run_docker_tests.sh So no longer requires funny mapping in workspace view (see README.md for view) |
||
#6 | 24223 | C. Thomas Tyler |
Made sample commands that should work w/o modification, instead of mixing CentOS/Ubuntu. Replaced `pwd` with $PWD because `pwd` doesn't render as reliably in different Markdown editors. Removed unnecessay 'sudo' (since it is called when aleady root). #review @robert_cowham |
||
#5 | 20881 | Robert Cowham | Clarify docker instructions. | ||
#4 | 19023 | Robert Cowham | Update to refer to Docker instead of Vagrant | ||
#3 | 12924 | C. Thomas Tyler | Very minor doc tweaks in SDP test suite. | ||
#2 | 12028 | C. Thomas Tyler | Refreshed SDP dev branch, merging down from main. | ||
#1 | 10638 | C. Thomas Tyler | Populate perforce_software-sdp-dev. | ||
//guest/perforce_software/sdp/main/test/README.md | |||||
#2 | 10459 | Robert Cowham |
Fix test comments regarding workspace setup for Workshop location Tidy Vangrantfile comments #review |
||
#1 | 10148 | C. Thomas Tyler | Promoted the Perforce Server Deployment Package to The Workshop. |