test/jdk/tools/jjs/jjs-scriptingTest.sh
author lancea
Tue, 29 Oct 2019 14:22:18 -0400
changeset 58845 e492513d3630
parent 47216 71c04702a3d5
permissions -rw-r--r--
8231766: Files.copy and Files.move do not honor requested compression method when copying or moving within the same zip file Reviewed-by: clanger, bpb, alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34721
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     1
#!/bin/sh
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     2
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     3
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     4
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     5
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     6
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     7
# This code is free software; you can redistribute it and/or modify it
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     8
# under the terms of the GNU General Public License version 2 only, as
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
     9
# published by the Free Software Foundation.
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    10
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    15
# accompanied this code).
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    16
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    20
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    23
# questions.
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    24
#
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    25
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    26
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    27
# @test
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    28
# @bug 8145750
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    29
# @summary jjs fails to run simple scripts with security manager turned on
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    30
# @run shell jjs-scriptingTest.sh
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    31
# Tests setting scripting mode via -scripting option
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    32
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    33
. ${TESTSRC-.}/common.sh
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    34
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    35
setup
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    36
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    37
${JJS} -J-Djava.security.manager -scripting ${TESTSRC}/scripting.js
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    38
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    39
if [ $? -ne 0 ]; then 
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    40
    exit 1
59801fbd042e 8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff changeset
    41
fi