Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systools: support creating start.boot in make_script and adding files to make_tar #2420

Merged
merged 5 commits into from
Mar 20, 2020

Conversation

tsloughter
Copy link
Contributor

I'm unable to compile OTP in order to run tests so I have not confirmed these changes yet. But because that has been taking so long to figure out I'm opening this as a draft for comment. I know that documentation still needs to be updated.

make_script now accepts the name of the boot file to create, it is not restricted to only RelName.boot or start.boot. This is because after talking to @josevalim he pointed out that Elixir releases need to create a start_clean.boot. With relx we just copy the one that is found in the Erlang install but they can't do that because it needs to include iex and elixir libs.

make_tar will take a list the same as the list of tuples you can pass to erl_tar, {From, To}.

@garazdawi garazdawi added feature team:VM Assigned to OTP team VM labels Oct 17, 2019
@garazdawi
Copy link
Contributor

Did you manage to run the tests? You need a released system to run the sasl test properly. I do this:

export ERL_TOP=`pwd`
./otp_build all -a && make release_tests
release/`erts/autoconf/config.guess`/
./Install -minimal `pwd`
export PATH=`pwd`/bin:$PATH
cd ../tests/test_server
erl
ts:install().
ts:run(sasl, systools_SUITE, [batch]).

I got a couple of errors:

=== Ended at 2019-10-17 17:16:35
=== Location: [{systools_make,make_script,140},
              {systools_SUITE,normal_tar,908},
              {test_server,ts_tc,1754},
              {test_server,run_test_case_eval1,1263},
              {test_server,run_test_case_eval,1195}]
=== === Reason: bad argument: [{script_name,"start"}]
  in function  systools_make:make_script/2
     called as systools_make:make_script("latest",
                                         [silent,
                                          {path,
                                           ["/home/eluklar/git/otp4/release/tests/test_server/ct_run.test_server@elxd3291v0k.2019-10-17_17.13.17/tests.sasl_test.logs/run.2019-10-17_17.13.20/log_private/datacopy/d_normal/lib/db-2.1/ebin",
                                            "/home/eluklar/git/otp4/release/tests/test_server/ct_run.test_server@elxd3291v0k.2019-10-17_17.13.17/tests.sasl_test.logs/run.2019-10-17_17.13.20/log_private/datacopy/d_normal/lib/fe-3.1/ebin"]},
                                          {script_name,"start"}])
  in call from systools_SUITE:normal_tar/1 (systools_SUITE.erl, line 908)
  in call from test_server:ts_tc/3 (test_server.erl, line 1754)
  in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1263)
  in call from test_server:run_test_case_eval/9 (test_server.erl, line 1195)
=== Ended at 2019-10-17 17:16:48
=== Location: [{filename,join},
 {systools_SUITE,additional_files_tar,1021},
 {test_server,ts_tc,1754},
 {test_server,run_test_case_eval1,1263},
 {test_server,run_test_case_eval,1195}]
=== === Reason: undefined function filename:join/3
  in function  systools_SUITE:additional_files_tar/1 (systools_SUITE.erl, line 1021)
  in call from test_server:ts_tc/3 (test_server.erl, line 1754)
  in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1263)
  in call from test_server:run_test_case_eval/9 (test_server.erl, line 1195)

@tsloughter
Copy link
Contributor Author

I still haven't. I'll try the commands you listed, they look different from what is in the wiki https://github.com/erlang/otp/wiki/Running-tests#building

@garazdawi
Copy link
Contributor

I'll try the commands you listed, they look different from what is in the wiki https://github.com/erlang/otp/wiki/Running-tests#building

yeah, you are running the one of the few (if not only) suite out of all our suites that require an actual installed target system to test with and can't run in the build tree.

@garazdawi
Copy link
Contributor

https://github.com/erlang/otp/wiki/Running-tests#building

actually those instructions should work, the only thing missing is:

export PATH=$PWD/tests_install/bin:$PATH

@tsloughter
Copy link
Contributor Author

I still get failures:

 LD	/home/tristan/Devel/otp/bin/x86_64-unknown-linux-gnu/beam.prof.smp
/usr/bin/ld: obj/x86_64-unknown-linux-gnu/opt/smp/erl_cpu_topology.o: in function `get_logical_processors':
/home/tristan/Devel/otp/erts/emulator/beam/erl_cpu_topology.c:1644: undefined reference to `erts_get_cpu_quota'
/usr/bin/ld: /home/tristan/Devel/otp/erts/emulator/beam/erl_cpu_topology.c:1644: undefined reference to `erts_get_cpu_quota'

@garazdawi
Copy link
Contributor

Do a git clean -xfdq and that will go away.

@tsloughter
Copy link
Contributor Author

Agh, thanks! I hit this every time I need to run the OTP tests :) and never remember to just do a clean.

@tsloughter
Copy link
Contributor Author

Ok, tests are fixed up. I'll get the docs updated tomorrow.

@garazdawi garazdawi added the waiting waiting for changes/input from author label Nov 19, 2019
@tsloughter tsloughter marked this pull request as ready for review February 9, 2020 21:32
@tsloughter
Copy link
Contributor Author

Forgot I had opened this... hell, I forgot I even wrote the code!

Now that I'm working on relx 4.0.0 I've come back to it and integrated it with relx and it works great.

@tsloughter
Copy link
Contributor Author

And I have run the systools_SUITE and all passes.

@garazdawi garazdawi added testing currently being tested, tag is used by OTP internal CI and removed waiting waiting for changes/input from author labels Feb 10, 2020
@garazdawi
Copy link
Contributor

Put into testing. You mentioned something about docs?

@tsloughter
Copy link
Contributor Author

Woops, thought I had done that. Will try to knock those out this morning.

@tsloughter
Copy link
Contributor Author

Ok, docs are added.

@garazdawi garazdawi added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Feb 10, 2020
@garazdawi garazdawi removed the testing currently being tested, tag is used by OTP internal CI label Feb 21, 2020
@rickard-green rickard-green added the testing currently being tested, tag is used by OTP internal CI label Mar 2, 2020
@garazdawi garazdawi merged commit be01e1f into erlang:master Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants