Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add a test target to your Makefile so one memorable command runs the repository’s existing test command. Mark the target .PHONY, then add only the real build or setup prerequisites the tests need. Run the suite with make test.

How to add a test target to a Makefile

A Make rule connects a target to its prerequisites and the recipe Make runs to update it. For a test command that does not create a file named test, start with:

.PHONY: test

test:
	./scripts/run-tests

Replace ./scripts/run-tests with the test command your repository already uses. Then run:

make test

.PHONY tells Make that test is an action, not a generated file. Without it, a file or directory named test could cause Make to treat the target as already up to date and skip the recipe. See the GNU Make manual’s Phony Targets guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Put required setup in prerequisites

If tests need a built executable or generated fixture, represent that actual dependency in the rule rather than relying on users to remember a separate command. For example, if build/app is a real output produced by a build/app rule, the test target can depend on it:

.PHONY: test

test: build/app
	./scripts/run-tests

Make updates prerequisites before running the target’s recipe. Keep the test action phony, but avoid making a phony target a prerequisite of a real output file: that can force the real file’s recipe to run every time Make considers it. The GNU Make manual explains rules and prerequisites and this warning about phony targets.

How to run only part of the test suite

Name separate goals for test groups that are useful to run independently, such as unit and integration tests. Users can request a specific goal instead of the whole suite:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
make test-unit
make test-integration

If an aggregate test run is useful, make the default test goal depend on those group goals:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
.PHONY: test test-unit test-integration

test: test-unit test-integration

test-unit:
	./scripts/run-unit-tests

test-integration:
	./scripts/run-integration-tests

Choose the grouping based on useful scope, required setup, runtime, and resource sharing. If integration tests need a database while unit tests do not, keeping them separately addressable lets a developer request the narrower work. Make runs the first target in the first makefile as the default goal in the usual case; naming a goal such as make test-unit requests that work explicitly. See the GNU Make manual’s rules and goals documentation.

Can Make run tests in parallel?

Yes, GNU Make can run independent prerequisite work concurrently when invoked with -j, for example make -j4 test. Correctness depends on the Makefile accurately describing dependencies. If two test groups write to the same temporary directory, use the same port, alter one database, or otherwise share mutable state, launching them concurrently may cause conflicts.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Serialize work that shares resources

First determine which tasks truly depend on one another or cannot safely overlap. Encode those constraints rather than assuming that parallel execution is harmless. GNU Make 4.4.1 documents .WAIT for ordering prerequisites and .NOTPARALLEL for serializing prerequisites of a selected target or the whole invocation. These are GNU Make controls; check the implementation used by your repository before relying on them. The GNU manual covers parallel execution and serialization.

For an initial Makefile, keep shared-resource test work serial. Add parallel execution only after the prerequisite graph and resource constraints are understood.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical setup workflow

  1. Find the test command the repository already documents or uses, plus any required setup.
  2. Add a .PHONY test target that invokes that command.
  3. Add only genuine build or fixture prerequisites needed before tests can run.
  4. Split suites into separate goals when developers benefit from selecting one group.
  5. Check whether groups share files, services, ports, or other mutable resources before enabling parallel runs.
  6. Document environment variables and optional test groups next to the Makefile or in the project’s existing developer documentation.

Troubleshooting common Make test issues

make test says the target is up to date

Check for a file or directory named test. Declare .PHONY: test so Make treats the target as an action rather than an output file.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Tests run before a required build or fixture exists

Add the real output or setup target as a prerequisite of test. Confirm there is a rule that creates that prerequisite; listing a dependency does not itself create the file.

Parallel runs fail intermittently

Look for overlapping writes or shared services, then model the required ordering or serialize the affected tasks. A Makefile can only schedule safely when its dependency relationships and relevant resource constraints are represented.

A GNU Make feature is rejected

Verify which make implementation is installed. The cited GNU documentation is for GNU Make 4.4.1; GNU-specific controls such as .WAIT should not be assumed to work identically in other implementations.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your test workflow also needs website screenshots, ScreenshotNeo can return a screenshot or PDF with one API request. For example, this cURL call captures a page as WebP:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. It accepts cookie and consent banners before capture and removes supported consent platforms, newsletter popups, and chat widgets; bot checks, blank pages, and failed loads are not billed. Its MCP server offers screenshot tools for AI agents. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

ScreenshotNeo is a website screenshot API and MCP server from Yorker Media; it is a separate tool from Make and is relevant when a test workflow needs page captures.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.