{"id":20119605,"url":"https://github.com/box/makefile.test","last_synced_at":"2025-07-28T23:34:30.059Z","repository":{"id":66050286,"uuid":"112543812","full_name":"box/Makefile.test","owner":"box","description":"A makefile used for running test executables","archived":false,"fork":false,"pushed_at":"2018-01-15T08:06:37.000Z","size":23,"stargazers_count":33,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T14:37:22.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blog.box.com/blog/introducing-makefiletest-generic-makefile-run-test-executables/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-30T00:29:40.000Z","updated_at":"2024-11-04T14:58:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"f37722c5-7142-420b-8cc7-7b8e0b1c7bf6","html_url":"https://github.com/box/Makefile.test","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/box/Makefile.test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2FMakefile.test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2FMakefile.test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2FMakefile.test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2FMakefile.test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/box","download_url":"https://codeload.github.com/box/Makefile.test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2FMakefile.test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267604324,"owners_count":24114522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T19:16:16.968Z","updated_at":"2025-07-28T23:34:30.053Z","avatar_url":"https://github.com/box.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Makefile.test\n\n[![Project Status](http://opensource.box.com/badges/stable.svg)](http://opensource.box.com/badges)\n[![CircleCI](https://circleci.com/gh/box/Makefile.test.svg?style=svg)](https://circleci.com/gh/box/Makefile.test)\n\nA makefile used for running test executables.\n\nMakefile.test can be used to run any type of test executables. It is not\nlanguage specific nor it requires any changes to your code. Parallel, serial\nexecution, various platforms and make versions are supported. The executables\ncan be organized in any desired way. The user only lists the test files, the\nrest is taken care of Makefile.test.\n\nMakefile.test does not contain any rules for compilation and other\npre-processing steps. If your test executables are not scripts, but for example\ncompiled binaries, you will need to extend Makefile.test with additional rules.\nMakefile.test can still be a good starting point for those scenarios.\n\nMakefile.test runs on a single host and therefore its parallelization is\nlimited with the resources of one machine. If your test suite requires multiple\nhosts to run, [ClusterRunner](http://www.clusterrunner.com/) can be a better\ntool for your use case.\n\n## Usage:\n\n### Example: A repo that has a `src` and a `test` directory.\n\nA simple repository has a `src` and a `test` directory at its root. The\nprogrammer places application code in `src` and test executables in `test`.\nUsing the `Makefile.test`, the executables in `test` can be executed with ease.\n\nThe directory structure can look like the following:\n\n```\nExampleRepo\n├── Makefile.test\n├── src\n│   └── ExampleApplication.sh\n└── test\n    ├── ExampleTest1.sh\n    ├── ExampleTest2.py\n    └── Makefile\n```\n\n\u003e For a recommended way to place the Makefile.test into your own repo see the\n\u003e [Installation](#installation) section next.\n\nThe `Makefile` file in the `test` directory needs to list the executables in a\n`TESTS` variable and include the `Makefile.test`\n\n\n```\nTESTS ?= \\\n\tExampleTest1.sh \\\n\tExampleTest2.py\n\ninclude ../Makefile.test\n```\n\n\nTo run the tests, any of the following can be used from the repo root.\n\n```\ncd test \u0026\u0026 make -j\nmake -C test -j\nmake -f test/Makefile -j\n```\n\nThe output looks as follows:\n\n```\n  [ExampleTest1.sh] Running ExampleTest1\n  [ExampleTest2.py] Running ExampleTest2\n PASSED: ExampleTest1.sh\n PASSED: ExampleTest2.py\n---------------------------------\nAll        2 tests passed\n---------------------------------\n```\n\n### Running one test at a time.\n\nDuring development or debugging time, you may want to execute only one test at\na time. In order to achive that without modifying any files, overwrite the\nTESTS environment variable from the command line:\n\n```\nTESTS=ExampleTest2.py make\n```\n\nOnly runs the specified test:\n\n```\n  [ExampleTest2.py] Running ExampleTest2\n PASSED: ExampleTest2.py\n---------------------------------\nAll        1 tests passed\n---------------------------------\n```\n\n## Installation:\n\n### Requirements\n\n- [`bash`](https://www.gnu.org/software/bash/) needs to be installed at `/bin/bash`.\n\n### Using git submodules and symlink to the Makefile.test.\n\nIn the directory you want to place Makefile.test execute the following:\n\n```\ngit submodule add https://github.com/box/Makefile.test.git .Makefile.test\nln -s .Makefile.test/Makefile.test\n```\n\nFirst command creates a hidden dir with the submoduled repo.\nSecond command symlinks the Makefile.test file.\n\nThe directory tree of `ExampleRepo` with the submodule and the symlink looks like\nthis:\n\n```\n ExampleRepo\n ├── .Makefile.test\n │   ├── .....\n │   └── Makefile.test\n ├── Makefile.test -\u003e .Makefile.test/Makefile.test\n ├── src\n │   └── ....\n └── test\n     └── ....\n\n```\n\n### Update your `.gitignore` file.\n\nIn order to avoid temporary files that may be created by Makefile.test, you should\nto update your `.gitignore` file.\n\n```\n# Intermediate files created by Makefile.test\n**/.makefile_test_*ed_tests\n```\n\n## Killing, Interrupting `make`\n\nIf hung tests are encountered, one may want to kill the `make` execution.\nFor SIGTERM, the user should send SIGTERM to the *process group* of `make`. Using\nsomething similar to:\n\n```\nkill -s TERM -- -\u003cpgrp id of make\u003e\n```\n\nIf SIGTERM is only sent to `make` child processes will be orphaned and left behind.\n\nIf `make` is invoked interactively from a terminal, `CTRL-C` should kill all running\nprocesses cleanly.\n\n\n\n## Support\n\nNeed to contact us directly? Email oss@box.com and be sure to include the name of this project in the subject.\n\n## Copyright and License\n\nCopyright 2017 Box, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fmakefile.test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbox%2Fmakefile.test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fmakefile.test/lists"}