Skip to content

Commit

Permalink
[erlang] Run tests even if rebar3 is absent
Browse files Browse the repository at this point in the history
Summary:
Erlang tests used to be rebar3 projects but have long been moved to use
`erlc` directly. Thus, they should be enabled if `erlc` is available on
the machine (not it if `rebar3` is available on the machine).

Reviewed By: jvillard

Differential Revision: D45736354

fbshipit-source-id: 6620fc911e033455434005bea26db2c9a51aecfd
  • Loading branch information
rgrig authored and facebook-github-bot committed May 12, 2023
1 parent e7f8cbe commit eca4a31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,18 @@ endif # HAS_OBJC
endif # BUILD_C_ANALYZERS

ifeq ($(BUILD_ERLANG_ANALYZERS),yes)
ifneq ($(REBAR3),no)
ifneq ($(ERLC),no)
ifneq ($(ESCRIPT),no)
DIRECT_TESTS += \
erlang_pulse \
erlang_pulse-otp \
erlang_pulse-taint \
erlang_topl \
erlang_compiler \

endif
endif
ifneq ($(REBAR3),no)
BUILD_SYSTEMS_TESTS += rebar3
endif
endif # BUILD_ERLANG_ANALYZERS
Expand Down
2 changes: 2 additions & 0 deletions Makefile.autoconf.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ DIFF_CAN_FORMAT := @DIFF_CAN_FORMAT@
EMACS := @EMACS@
ENABLE_OCAMLOPT_CUSTOM_CC := @ENABLE_OCAMLOPT_CUSTOM_CC@
ENABLE_OCAML_BINANNOT := @ENABLE_OCAML_BINANNOT@
ERLC := @ERLC@
ESCRIPT := @ESCRIPT@
exec_prefix = @exec_prefix@
GNU_SED := @GNU_SED@
HACKC := @HACKC@
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ AC_SUBST([OPAMSWITCH])

if test "x$enable_erlang_analyzers" = "xyes"; then
AC_CHECK_TOOL([ESCRIPT], [escript], [no])
AC_CHECK_TOOL([ERLC], [erlc], [no])
AC_CHECK_TOOL([REBAR3], [rebar3], [no])
fi
# end if($enable_erlang_analyzers)
Expand Down

0 comments on commit eca4a31

Please sign in to comment.