Skip to contentSkip to conversation

tests/cpu-policy: fix "run" goal

PATCH In review Jan Beulich 2 participants 4 messages Apr 18, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/cpu-policy: fix "run" goal

An earlier change converted TARGET-y to TARGETS, but failed to replace all references. Convert run's dependency, but use $< in the command to avoid the leading blank that += inserts.

Fixes 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
tools/tests/cpu-policy/Makefile +2 -2
@@ -16,8 +16,8 @@ endif
 all: $(TARGETS)
 
 .PHONY: run
-run: $(TARGET-y)
-	./$(TARGET-y)
+run: $(TARGETS)
+	./$<
 
 .PHONY: clean
 clean:
#1 lore raw
Quoted 10 lines · Jan Beulich

An earlier change converted TARGET-y to TARGETS, but failed to replace all references. Convert run's dependency, but use $< in the command to avoid the leading blank that += inserts.

Fixes 6a9f5477637a ("tests/cpu-policy: Rework Makefile")

tools/tests/cpu-policy/Makefile endif · line 20

Quoted 7 lines
tools/tests/cpu-policy/Makefile +2 -2
@@ -16,8 +16,8 @@ endif
 all: $(TARGETS)
 
 .PHONY: run
-run: $(TARGET-y)
-	./$(TARGET-y)
+run: $(TARGETS)
+	./$<

Since it seems like TARGETS can contain multiple outputs, do we want to have a for loop here?

Thanks, Roger.

#2 lore raw
Quoted 13 lines · Roger Pau Monné
Quoted 12 lines · Jan Beulich

An earlier change converted TARGET-y to TARGETS, but failed to replace all references. Convert run's dependency, but use $< in the command to avoid the leading blank that += inserts.

Fixes 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
tools/tests/cpu-policy/Makefile +0 -0
@@ -16,8 +16,8 @@ endif
 all: $(TARGETS)
 
Quoted 8 lines

tools/tests/cpu-policy/Makefile endif · line 20

Quoted 5 lines
tools/tests/cpu-policy/Makefile +2 -2
 .PHONY: run
-run: $(TARGET-y)
-	./$(TARGET-y)
+run: $(TARGETS)
+	./$<

Since it seems like TARGETS can contain multiple outputs, do we want to have a for loop here?

Imo TARGETS is just the conventional name, even if it expand to only a single target. I'd prefer to stick with the simple rule until such time that there really are multiple executables here.

Jan

#3 lore raw
Quoted 23 lines · Jan Beulich
Quoted 13 lines · Roger Pau Monné
Quoted 12 lines · Jan Beulich

An earlier change converted TARGET-y to TARGETS, but failed to replace all references. Convert run's dependency, but use $< in the command to avoid the leading blank that += inserts.

Fixes 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
tools/tests/cpu-policy/Makefile +0 -0
@@ -16,8 +16,8 @@ endif
 all: $(TARGETS)
 
Quoted 8 lines

tools/tests/cpu-policy/Makefile endif · line 20

Quoted 5 lines
tools/tests/cpu-policy/Makefile +2 -2
 .PHONY: run
-run: $(TARGET-y)
-	./$(TARGET-y)
+run: $(TARGETS)
+	./$<

Since it seems like TARGETS can contain multiple outputs, do we want to have a for loop here?

Quoted 3 lines

Imo TARGETS is just the conventional name, even if it expand to only a single target. I'd prefer to stick with the simple rule until such time that there really are multiple executables here.

Not specially fuzzed either way, and it's certainly an improvement from the current status:

Thanks, Roger.