@@ -686,19 +686,13 @@ defmodule Mix.ReleaseTest do
686
686
test "copies and strips beams" do
687
687
assert copy_ebin ( release ( [ ] ) , @ eex_ebin , tmp_path ( "eex_ebin" ) )
688
688
689
- assert size! ( Path . join ( @ eex_ebin , "eex.app" ) ) ==
690
- size! ( tmp_path ( "eex_ebin/eex.app" ) )
691
-
692
689
assert size! ( Path . join ( @ eex_ebin , "Elixir.EEx.beam" ) ) >
693
690
size! ( tmp_path ( "eex_ebin/Elixir.EEx.beam" ) )
694
691
end
695
692
696
693
test "copies without stripping beams" do
697
694
assert copy_ebin ( release ( strip_beams: false ) , @ eex_ebin , tmp_path ( "eex_ebin" ) )
698
695
699
- assert size! ( Path . join ( @ eex_ebin , "eex.app" ) ) ==
700
- size! ( tmp_path ( "eex_ebin/eex.app" ) )
701
-
702
696
assert size! ( Path . join ( @ eex_ebin , "Elixir.EEx.beam" ) ) ==
703
697
size! ( tmp_path ( "eex_ebin/Elixir.EEx.beam" ) )
704
698
end
@@ -722,6 +716,13 @@ defmodule Mix.ReleaseTest do
722
716
723
717
assert mode! ( source_so_path ) == mode! ( tmp_path ( "mix_release/libtest_nif.so" ) )
724
718
end
719
+
720
+ test "removes config_mtime from app files" do
721
+ assert copy_ebin ( release ( [ ] ) , @ eex_ebin , tmp_path ( "eex_ebin" ) )
722
+
723
+ { :ok , [ { :application , :eex , info } ] } = :file . consult ( tmp_path ( "eex_ebin/eex.app" ) )
724
+ refute Keyword . get ( info , :config_mtime )
725
+ end
725
726
end
726
727
727
728
describe "copy_app/2" do
@@ -730,19 +731,13 @@ defmodule Mix.ReleaseTest do
730
731
test "copies and strips beams" do
731
732
assert copy_app ( release ( applications: [ eex: :permanent ] ) , :eex )
732
733
733
- assert size! ( Path . join ( @ eex_ebin , "eex.app" ) ) ==
734
- size! ( Path . join ( @ release_lib , "eex-#{ @ elixir_version } /ebin/eex.app" ) )
735
-
736
734
assert size! ( Path . join ( @ eex_ebin , "Elixir.EEx.beam" ) ) >
737
735
size! ( Path . join ( @ release_lib , "eex-#{ @ elixir_version } /ebin/Elixir.EEx.beam" ) )
738
736
end
739
737
740
738
test "copies without stripping beams" do
741
739
assert copy_app ( release ( strip_beams: false , applications: [ eex: :permanent ] ) , :eex )
742
740
743
- assert size! ( Path . join ( @ eex_ebin , "eex.app" ) ) ==
744
- size! ( Path . join ( @ release_lib , "eex-#{ @ elixir_version } /ebin/eex.app" ) )
745
-
746
741
assert size! ( Path . join ( @ eex_ebin , "Elixir.EEx.beam" ) ) ==
747
742
size! ( Path . join ( @ release_lib , "eex-#{ @ elixir_version } /ebin/Elixir.EEx.beam" ) )
748
743
end
@@ -760,6 +755,14 @@ defmodule Mix.ReleaseTest do
760
755
refute File . exists? ( Path . join ( @ release_lib , "runtime_tools-#{ @ runtime_tools_version } /ebin" ) )
761
756
refute File . exists? ( Path . join ( @ release_lib , "runtime_tools-#{ @ runtime_tools_version } /priv" ) )
762
757
end
758
+
759
+ test "removes config_mtime from app files" do
760
+ assert copy_app ( release ( strip_beams: false , applications: [ eex: :permanent ] ) , :eex )
761
+
762
+ eex_app_path = Path . join ( @ release_lib , "eex-#{ @ elixir_version } /ebin/eex.app" )
763
+ { :ok , [ { :application , :eex , info } ] } = :file . consult ( eex_app_path )
764
+ refute Keyword . get ( info , :config_mtime )
765
+ end
763
766
end
764
767
765
768
describe "strip_beam/1" do
0 commit comments