Skip to content

Commit a6e7424

Browse files
committed
---
yaml --- r: 63428 b: refs/heads/snap-stage3 c: 474bd60 h: refs/heads/master v: v3
1 parent 095740f commit a6e7424

File tree

12 files changed

+56
-94
lines changed

12 files changed

+56
-94
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b82370cec65b17456b1d5b98a283d3f46a8ab09a
4+
refs/heads/snap-stage3: 474bd60c1bc242664bff876804e8fa4c5b27214d
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/tests.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ CFG_ADB_TEST_DIR=/data/tmp
122122
$(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
123123
$(shell adb remount 1>/dev/null) \
124124
$(shell adb shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \
125-
$(shell adb shell rm -rf $(CFG_ADB_TEST_DIR)/* 1>/dev/null) \
125+
$(shell adb shell rm $(CFG_ADB_TEST_DIR)/*.so 1>/dev/null) \
126+
$(shell adb shell rm $(CFG_ADB_TEST_DIR)/*-arm-linux-androideabi 1>/dev/null) \
127+
$(shell adb shell rm $(CFG_ADB_TEST_DIR)/*-arm-linux-androideabi.* 1>/dev/null) \
126128
$(shell adb push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
127129
$(shell adb push $(CFG_ANDROID_CROSS_PATH)/arm-linux-androideabi/lib/armv7-a/libgnustl_shared.so \
128130
$(CFG_ADB_TEST_DIR) 1>/dev/null) \

branches/snap-stage3/src/etc/adb_run_wrapper.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ then
1717

1818
L_RET=1
1919
L_COUNT=0
20-
cd $PATH
2120
while [ $L_RET -eq 1 ]
2221
do
23-
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
22+
LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
2423
L_RET=$?
2524
if [ $L_COUNT -gt 0 ]
2625
then
2726
/system/bin/sleep $WAIT
2827
/system/bin/sync
2928
fi
30-
L_COUNT=$((L_COUNT+1))
29+
L_COUNT=`expr $L_COUNT+1`
3130
done
3231

3332
echo $L_RET > $PATH/$RUN.exitcode

branches/snap-stage3/src/libstd/libc.rs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ pub mod types {
257257
pub type intptr_t = int;
258258
pub type uintptr_t = uint;
259259
}
260-
#[cfg(target_arch = "x86")]
261-
#[cfg(target_arch = "mips")]
262260
pub mod posix88 {
263261
pub type off_t = i32;
264262
pub type dev_t = u64;
@@ -270,20 +268,6 @@ pub mod types {
270268
pub type mode_t = u32;
271269
pub type ssize_t = i32;
272270
}
273-
#[cfg(target_arch = "arm")]
274-
pub mod posix88 {
275-
pub type off_t = i32;
276-
pub type dev_t = u32;
277-
pub type ino_t = u32;
278-
pub type pid_t = i32;
279-
pub type uid_t = u32;
280-
pub type gid_t = u32;
281-
pub type useconds_t = u32;
282-
pub type mode_t = u16;
283-
pub type ssize_t = i32;
284-
}
285-
#[cfg(target_arch = "x86")]
286-
#[cfg(target_arch = "mips")]
287271
pub mod posix01 {
288272
use libc::types::os::arch::c95::{c_short, c_long, c_ulong, time_t};
289273
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -295,6 +279,7 @@ pub mod types {
295279
pub type blkcnt_t = i32;
296280

297281
#[cfg(target_arch = "x86")]
282+
#[cfg(target_arch = "arm")]
298283
pub struct stat {
299284
st_dev: dev_t,
300285
__pad1: c_short,
@@ -342,39 +327,6 @@ pub mod types {
342327
st_pad5: [c_long, ..14],
343328
}
344329
}
345-
#[cfg(target_arch = "arm")]
346-
pub mod posix01 {
347-
use libc::types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
348-
use libc::types::os::arch::c99::{c_longlong, c_ulonglong};
349-
use libc::types::os::arch::posix88::{uid_t, gid_t, ino_t};
350-
use libc::types::os::arch::posix88::{uid_t};
351-
352-
pub type nlink_t = u16;
353-
pub type blksize_t = u32;
354-
pub type blkcnt_t = u32;
355-
356-
pub struct stat {
357-
st_dev: c_ulonglong,
358-
__pad0: [c_uchar, ..4],
359-
__st_ino: ino_t,
360-
st_mode: c_uint,
361-
st_nlink: c_uint,
362-
st_uid: uid_t,
363-
st_gid: gid_t,
364-
st_rdev: c_ulonglong,
365-
__pad3: [c_uchar, ..4],
366-
st_size: c_longlong,
367-
st_blksize: blksize_t,
368-
st_blocks: c_ulonglong,
369-
st_atime: time_t,
370-
st_atime_nsec: c_ulong,
371-
st_mtime: time_t,
372-
st_mtime_nsec: c_ulong,
373-
st_ctime: time_t,
374-
st_ctime_nsec: c_ulong,
375-
st_ino: c_ulonglong
376-
}
377-
}
378330
pub mod posix08 {}
379331
pub mod bsd44 {}
380332
pub mod extra {}

branches/snap-stage3/src/libstd/path.rs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ pub trait GenericPath {
128128
#[cfg(target_os = "android")]
129129
mod stat {
130130
#[cfg(target_arch = "x86")]
131+
#[cfg(target_arch = "arm")]
131132
pub mod arch {
132133
use libc;
133134

@@ -157,35 +158,6 @@ mod stat {
157158
}
158159
}
159160

160-
#[cfg(target_arch = "arm")]
161-
pub mod arch {
162-
use libc;
163-
164-
pub fn default_stat() -> libc::stat {
165-
libc::stat {
166-
st_dev: 0,
167-
__pad0: [0, ..4],
168-
__st_ino: 0,
169-
st_mode: 0,
170-
st_nlink: 0,
171-
st_uid: 0,
172-
st_gid: 0,
173-
st_rdev: 0,
174-
__pad3: [0, ..4],
175-
st_size: 0,
176-
st_blksize: 0,
177-
st_blocks: 0,
178-
st_atime: 0,
179-
st_atime_nsec: 0,
180-
st_mtime: 0,
181-
st_mtime_nsec: 0,
182-
st_ctime: 0,
183-
st_ctime_nsec: 0,
184-
st_ino: 0
185-
}
186-
}
187-
}
188-
189161
#[cfg(target_arch = "mips")]
190162
pub mod arch {
191163
use libc;

branches/snap-stage3/src/libstd/str.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,12 @@ impl<'self> Iterator<u8> for StrBytesRevIterator<'self> {
22022202
}
22032203
}
22042204
2205+
// This works because every lifetime is a sub-lifetime of 'static
2206+
impl<'self> Zero for &'self str {
2207+
fn zero() -> &'self str { "" }
2208+
fn is_zero(&self) -> bool { self.is_empty() }
2209+
}
2210+
22052211
impl Zero for ~str {
22062212
fn zero() -> ~str { ~"" }
22072213
fn is_zero(&self) -> bool { self.len() == 0 }
@@ -3317,4 +3323,18 @@ mod tests {
33173323
t("zzz", "zz", ~["","z"]);
33183324
t("zzzzz", "zz", ~["","","z"]);
33193325
}
3326+
3327+
#[test]
3328+
fn test_str_zero() {
3329+
use num::Zero;
3330+
fn t<S: Zero + Str>() {
3331+
let s: S = Zero::zero();
3332+
assert_eq!(s.as_slice(), "");
3333+
assert!(s.is_zero());
3334+
}
3335+
3336+
t::<&str>();
3337+
t::<@str>();
3338+
t::<~str>();
3339+
}
33203340
}

branches/snap-stage3/src/libstd/vec.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,6 +2629,12 @@ impl<A:Clone> Clone for ~[A] {
26292629
}
26302630
}
26312631

2632+
// This works because every lifetime is a sub-lifetime of 'static
2633+
impl<'self, A> Zero for &'self [A] {
2634+
fn zero() -> &'self [A] { &'self [] }
2635+
fn is_zero(&self) -> bool { self.is_empty() }
2636+
}
2637+
26322638
impl<A> Zero for ~[A] {
26332639
fn zero() -> ~[A] { ~[] }
26342640
fn is_zero(&self) -> bool { self.len() == 0 }
@@ -4293,4 +4299,20 @@ mod tests {
42934299
}
42944300
assert_eq!(v, ~[~[1,2,3],~[1,3,2],~[2,1,3],~[2,3,1],~[3,1,2],~[3,2,1]]);
42954301
}
4302+
4303+
#[test]
4304+
fn test_vec_zero() {
4305+
use num::Zero;
4306+
macro_rules! t (
4307+
($ty:ty) => {
4308+
let v: $ty = Zero::zero();
4309+
assert!(v.is_empty());
4310+
assert!(v.is_zero());
4311+
}
4312+
);
4313+
4314+
t!(&[int]);
4315+
t!(@[int]);
4316+
t!(~[int]);
4317+
}
42964318
}

branches/snap-stage3/src/rt/jemalloc/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ vpath % .
99
SHELL := /bin/sh
1010

1111
CC := @CC@
12+
AR := @AR@
1213

1314
# Configuration parameters.
1415
DESTDIR =

branches/snap-stage3/src/rt/jemalloc/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4453,7 +4453,7 @@ PIC_CFLAGS='-fPIC -DPIC'
44534453
CTARGET='-o $@'
44544454
LDTARGET='-o $@'
44554455
EXTRA_LDFLAGS=
4456-
MKLIB='ar crus $@'
4456+
MKLIB='$(AR) crus $@'
44574457
CC_MM=1
44584458
44594459
default_munmap="1"

branches/snap-stage3/src/test/run-pass/core-run-destroy.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,12 @@ fn test_destroy_actually_kills(force: bool) {
4242
#[cfg(windows)]
4343
static BLOCK_COMMAND: &'static str = "cmd";
4444

45-
#[cfg(unix,not(target_os="android"))]
45+
#[cfg(unix)]
4646
fn process_exists(pid: libc::pid_t) -> bool {
4747
let run::ProcessOutput {output, _} = run::process_output("ps", [~"-p", pid.to_str()]);
4848
str::from_bytes(output).contains(pid.to_str())
4949
}
5050

51-
#[cfg(unix,target_os="android")]
52-
fn process_exists(pid: libc::pid_t) -> bool {
53-
let run::ProcessOutput {output, _} = run::process_output("/system/bin/ps", [pid.to_str()]);
54-
str::from_bytes(output).contains(~"root")
55-
}
56-
5751
#[cfg(windows)]
5852
fn process_exists(pid: libc::pid_t) -> bool {
5953

branches/snap-stage3/src/test/run-pass/intrinsic-alignment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod m {
6060
pub fn main() {
6161
unsafe {
6262
assert_eq!(::rusti::pref_align_of::<u64>(), 8u);
63-
assert_eq!(::rusti::min_align_of::<u64>(), 8u);
63+
assert_eq!(::rusti::min_align_of::<u64>(), 4u);
6464
}
6565
}
6666
}

branches/snap-stage3/src/test/run-pass/rec-align-u64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ mod m {
6363
mod m {
6464
#[cfg(target_arch = "arm")]
6565
pub mod m {
66-
pub fn align() -> uint { 8u }
67-
pub fn size() -> uint { 16u }
66+
pub fn align() -> uint { 4u }
67+
pub fn size() -> uint { 12u }
6868
}
6969
}
7070

0 commit comments

Comments
 (0)