Skip to content

Commit 4519917

Browse files
committed
Update make and install files to use ct_run instead of run_test and to keep a link to run_test available
1 parent 14d2033 commit 4519917

File tree

5 files changed

+34
-13
lines changed

5 files changed

+34
-13
lines changed

erts/Makefile.in

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,20 @@ endif
8787
# in the same directory...
8888
local_setup:
8989
@cd start_scripts && $(MAKE)
90+
@echo `ls $(ERL_TOP)/bin/`
9091
@rm -f $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc $(ERL_TOP)/bin/cerl \
9192
$(ERL_TOP)/bin/erl.exe $(ERL_TOP)/bin/erlc.exe \
9293
$(ERL_TOP)/bin/escript $(ERL_TOP)/bin/escript.exe \
9394
$(ERL_TOP)/bin/dialyzer $(ERL_TOP)/bin/dialyzer.exe \
9495
$(ERL_TOP)/bin/typer $(ERL_TOP)/bin/typer.exe \
9596
$(ERL_TOP)/bin/run_test $(ERL_TOP)/bin/run_test.exe \
97+
$(ERL_TOP)/bin/ct_run $(ERL_TOP)/bin/ct_run.exe \
9698
$(ERL_TOP)/bin/start*.boot $(ERL_TOP)/bin/start*.script
9799
@if [ "X$(TARGET)" = "Xwin32" ]; then \
98100
cp $(ERL_TOP)/bin/$(TARGET)/dialyzer.exe $(ERL_TOP)/bin/dialyzer.exe; \
99101
cp $(ERL_TOP)/bin/$(TARGET)/typer.exe $(ERL_TOP)/bin/typer.exe; \
100-
cp $(ERL_TOP)/bin/$(TARGET)/run_test.exe $(ERL_TOP)/bin/run_test.exe; \
102+
cp $(ERL_TOP)/bin/$(TARGET)/ct_run.exe $(ERL_TOP)/bin/ct_run.exe; \
103+
cp $(ERL_TOP)/bin/$(TARGET)/ct_run.exe $(ERL_TOP)/bin/run_test.exe; \
101104
cp $(ERL_TOP)/bin/$(TARGET)/erlc.exe $(ERL_TOP)/bin/erlc.exe; \
102105
cp $(ERL_TOP)/bin/$(TARGET)/erl.exe $(ERL_TOP)/bin/erl.exe; \
103106
cp $(ERL_TOP)/bin/$(TARGET)/werl.exe $(ERL_TOP)/bin/werl.exe; \
@@ -117,7 +120,8 @@ local_setup:
117120
$(ERL_TOP)/erts/etc/unix/cerl.src > $(ERL_TOP)/bin/cerl; \
118121
cp $(ERL_TOP)/bin/$(TARGET)/dialyzer $(ERL_TOP)/bin/dialyzer; \
119122
cp $(ERL_TOP)/bin/$(TARGET)/typer $(ERL_TOP)/bin/typer; \
120-
cp $(ERL_TOP)/bin/$(TARGET)/run_test $(ERL_TOP)/bin/run_test; \
123+
cp $(ERL_TOP)/bin/$(TARGET)/ct_run $(ERL_TOP)/bin/ct_run; \
124+
ln -s $(ERL_TOP)/bin/ct_run $(ERL_TOP)/bin/run_test; \
121125
cp $(ERL_TOP)/bin/$(TARGET)/erlc $(ERL_TOP)/bin/erlc; \
122126
cp $(ERL_TOP)/bin/$(TARGET)/escript $(ERL_TOP)/bin/escript; \
123127
chmod 755 $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc \

erts/etc/common/Makefile.in

+7-7
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ MC_OUTPUTS= \
178178
MT_FLAG="-MD"
179179
endif
180180
INET_GETHOST = $(BINDIR)/inet_gethost.exe
181-
INSTALL_EMBEDDED_PROGS += $(BINDIR)/typer.exe $(BINDIR)/dialyzer.exe $(BINDIR)/erlc.exe $(BINDIR)/start_erl.exe $(BINDIR)/escript.exe $(BINDIR)/run_test.exe
181+
INSTALL_EMBEDDED_PROGS += $(BINDIR)/typer.exe $(BINDIR)/dialyzer.exe $(BINDIR)/erlc.exe $(BINDIR)/start_erl.exe $(BINDIR)/escript.exe $(BINDIR)/ct_run.exe
182182
INSTALL_SRC = $(WINETC)/start_erl.c $(WINETC)/Nmakefile.start_erl
183183
ERLEXECDIR=.
184184
INSTALL_LIBS =
@@ -211,7 +211,7 @@ ERLSRV_OBJECTS=
211211
MC_OUTPUTS=
212212
INET_GETHOST = $(BINDIR)/inet_gethost@EXEEXT@
213213
INSTALL_EMBEDDED_PROGS += $(BINDIR)/typer@EXEEXT@ $(BINDIR)/dialyzer@EXEEXT@ \
214-
$(BINDIR)/erlc@EXEEXT@ $(BINDIR)/escript@EXEEXT@ $(BINDIR)/run_test@EXEEXT@ \
214+
$(BINDIR)/erlc@EXEEXT@ $(BINDIR)/escript@EXEEXT@ $(BINDIR)/ct_run@EXEEXT@ \
215215
$(BINDIR)/run_erl $(BINDIR)/to_erl $(BINDIR)/dyn_erl
216216
INSTALL_EMBEDDED_DATA = ../unix/start.src ../unix/start_erl.src
217217
INSTALL_TOP = Install
@@ -274,7 +274,7 @@ endif
274274
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/dyn_erl.o
275275
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/safe_string.o
276276
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/typer.o
277-
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/run_test.o
277+
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/ct_run.o
278278
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/vxcall.o
279279
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/erl.o
280280
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/werl.o
@@ -350,11 +350,11 @@ $(BINDIR)/escript@EXEEXT@: $(OBJDIR)/escript.o
350350
$(OBJDIR)/escript.o: escript.c
351351
$(CC) $(CFLAGS) -o $@ -c escript.c
352352

353-
$(BINDIR)/run_test@EXEEXT@: $(OBJDIR)/run_test.o
354-
$(PURIFY) $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/run_test.o -L$(OBJDIR) $(LIBS) $(ERTS_INTERNAL_LIBS)
353+
$(BINDIR)/ct_run@EXEEXT@: $(OBJDIR)/ct_run.o
354+
$(PURIFY) $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/ct_run.o -L$(OBJDIR) $(LIBS) $(ERTS_INTERNAL_LIBS)
355355

356-
$(OBJDIR)/run_test.o: run_test.c
357-
$(CC) $(CFLAGS) -o $@ -c run_test.c
356+
$(OBJDIR)/ct_run.o: ct_run.c
357+
$(CC) $(CFLAGS) -o $@ -c ct_run.c
358358

359359

360360
#------------------------------------------------------------------------

erts/etc/common/run_test.c erts/etc/common/ct_run.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ run_erlang(char* progname, char** argv)
394394

395395
status = my_spawnvp(argv)/*_spawnvp(_P_WAIT,progname,argv)*/;
396396
if (status == -1) {
397-
fprintf(stderr, "run_test: Error executing '%s': %d", progname,
397+
fprintf(stderr, "ct_run: Error executing '%s': %d", progname,
398398
GetLastError());
399399
}
400400
return status;
@@ -414,7 +414,7 @@ error(char* format, ...)
414414
va_start(ap, format);
415415
erts_vsnprintf(sbuf, sizeof(sbuf), format, ap);
416416
va_end(ap);
417-
fprintf(stderr, "run_test: %s\n", sbuf);
417+
fprintf(stderr, "ct_run: %s\n", sbuf);
418418
exit(1);
419419
}
420420

erts/etc/unix/Install.src

+4-1
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ cp -p $ERL_ROOT/erts-%I_VSN%/bin/erl .
8989
cp -p $ERL_ROOT/erts-%I_VSN%/bin/erlc .
9090
cp -p $ERL_ROOT/erts-%I_VSN%/bin/dialyzer .
9191
cp -p $ERL_ROOT/erts-%I_VSN%/bin/typer .
92-
cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_test .
92+
cp -p $ERL_ROOT/erts-%I_VSN%/bin/ct_run .
9393
cp -p $ERL_ROOT/erts-%I_VSN%/bin/escript .
9494

95+
# Remove in R16B
96+
ln -s ct_run run_test
97+
9598
#
9699
# Set a soft link to epmd
97100
# This should not be done for an embedded system!

erts/etc/win32/Install.c

+15-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
4646
HANDLE module = GetModuleHandle(NULL);
4747
char *binaries[] = { "erl.exe", "werl.exe", "erlc.exe",
4848
"dialyzer.exe", "typer.exe",
49-
"escript.exe", "run_test.exe", NULL };
49+
"escript.exe", "ct_run.exe", NULL };
5050
char *scripts[] = { "start_clean.boot", "start_sasl.boot", NULL };
5151
char fromname[MAX_PATH];
5252
char toname[MAX_PATH];
@@ -172,6 +172,20 @@ int main(int argc, char **argv)
172172
}
173173
}
174174

175+
// Remove in R16B
176+
sprintf(fromname,"%s\\%s",bin_dir,"ct_run.exe");
177+
sprintf(toname,"%s\\%s",bin_dir,"run_test.exe");
178+
if (GetFileAttributes(fromname) == 0xFFFFFFFF) {
179+
fprintf(stderr,"Could not find file %s\n",
180+
fromname);
181+
exit(1);
182+
}
183+
if (!CopyFile(fromname,toname,FALSE)) {
184+
fprintf(stderr,"Could not copy file %s to %s\n",
185+
fromname,toname);
186+
fprintf(stderr,"Continuing installation anyway...\n");
187+
}
188+
175189
for (i = 0; scripts[i] != NULL; ++i) {
176190
sprintf(fromname,"%s\\%s",release_dir,scripts[i]);
177191
sprintf(toname,"%s\\%s",bin_dir,scripts[i]);

0 commit comments

Comments
 (0)